Skip to content

Commit

Permalink
0.2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
JayCanuck committed Oct 21, 2016
2 parents b83b312 + 43c2f83 commit 332506a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
8 changes: 4 additions & 4 deletions global-cli/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function displayHelp() {
console.log();
console.log(' Options');
console.log(' -l, --local Scan with local eslint config');
console.log(' -f, --framework Scan with strict framework config');
console.log(' -s, --strict Scan with strict eslint config');
console.log(' -v, --version Display version information');
console.log(' -h, --help Display help information');
console.log();
Expand All @@ -21,13 +21,13 @@ function displayHelp() {

module.exports = function(args) {
var opts = minimist(args, {
boolean: ['l', 'local', 'f', 'framework', 'h', 'help'],
alias: {l:'local', f:'framework', h:'help'}
boolean: ['l', 'local', 's', 'strict', 'f', 'framework', 'h', 'help'],
alias: {l:'local', s:'strict', f:'framework', h:'help'}
});
opts.help && displayHelp();

var eslintArgs = [];
if(opts.framework) {
if(opts.strict || opts.framework) {
eslintArgs.push('--no-eslintrc', '--config', require.resolve('eslint-config-enact-internal/index.js'));
} else if(!opts.local) {
eslintArgs.push('--no-eslintrc', '--config', require.resolve('eslint-config-enact/index.js'));
Expand Down
15 changes: 8 additions & 7 deletions global-cli/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function addMiddleware(devServer) {
devServer.use(devServer.middleware);
}

function runDevServer(host, port, protocol) {
function runDevServer(host, port, protocol, shouldOpen) {
var devServer = new WebpackDevServer(compiler, {
contentBase: process.cwd(),
// Silence WebpackDevServer's own logs since they're generally not useful.
Expand Down Expand Up @@ -246,18 +246,19 @@ function runDevServer(host, port, protocol) {
});
}

function run(port) {
function run(port, shouldOpen) {
var protocol = process.env.HTTPS === 'true' ? "https" : "http";
var host = process.env.HOST || config.devServer.host || 'localhost';
setupCompiler(host, port, protocol);
runDevServer(host, port, protocol);
runDevServer(host, port, protocol, shouldOpen);
}

function displayHelp() {
console.log(' Usage');
console.log(' enact serve [options]');
console.log();
console.log(' Options');
console.log(' -b, --browser Automatically open browser');
console.log(' -v, --version Display version information');
console.log(' -h, --help Display help information');
console.log();
Expand All @@ -266,8 +267,8 @@ function displayHelp() {

module.exports = function(args) {
var opts = minimist(args, {
boolean: ['h', 'help'],
alias: {h:'help'}
boolean: ['b', 'browser', 'h', 'help'],
alias: {b:'browser', h:'help'}
});
opts.help && displayHelp();

Expand All @@ -285,7 +286,7 @@ module.exports = function(args) {
// run on a different port. `detect()` Promise resolves to the next free port.
detect(DEFAULT_PORT).then(port => {
if (port === DEFAULT_PORT) {
run(port);
run(port, opts.browser);
return;
}

Expand All @@ -296,7 +297,7 @@ module.exports = function(args) {

prompt(question, true).then(shouldChangePort => {
if (shouldChangePort) {
run(port);
run(port, opts.browser);
}
});
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"enyo-console-spy": "enyojs/enyo-console-spy",
"enzyme": "~2.4.1",
"eslint": "~3.7.1",
"eslint-config-enact": "github:enyojs/eslint-config-enact#PLAT-28813",
"eslint-config-enact": "github:enyojs/eslint-config-enact",
"eslint-config-enact-internal": "github:enyojs/eslint-config-enact-internal",
"eslint-loader": "~1.5.0",
"eslint-plugin-babel": "~3.3.0",
Expand Down
12 changes: 6 additions & 6 deletions template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
"extends": "enact"
},
"dependencies": {
"@enact/core": "^1.0.0-alpha.1",
"@enact/ui": "^1.0.0-alpha.1",
"@enact/moonstone": "^1.0.0-alpha.1",
"@enact/spotlight": "^1.0.0-alpha.1",
"@enact/i18n": "^1.0.0-alpha.1",
"@enact/webos": "^1.0.0-alpha.1",
"@enact/core": "^1.0.0-alpha.2",
"@enact/ui": "^1.0.0-alpha.2",
"@enact/moonstone": "^1.0.0-alpha.2",
"@enact/spotlight": "^1.0.0-alpha.2",
"@enact/i18n": "^1.0.0-alpha.2",
"@enact/webos": "^1.0.0-alpha.2",
"react": "^15.3.2",
"react-dom": "^15.3.2"
}
Expand Down

0 comments on commit 332506a

Please sign in to comment.