Comparing version 1.0.5 to 1.0.6
@@ -26,3 +26,3 @@ #! /usr/bin/env node | ||
} else { | ||
build.dev(process, pwd); | ||
build.dev(process, pwd, program.build); | ||
} | ||
@@ -29,0 +29,0 @@ }; |
@@ -7,3 +7,3 @@ const fs = require('fs'); | ||
function scanEntry(pwd) { | ||
function scanEntry(pwd, branches) { | ||
console.log(chalk.cyan(`[strat] scanEntry at ${pwd}`)); | ||
@@ -16,2 +16,20 @@ const startPath = Path.join(pwd, './src/app'); | ||
}); | ||
// filter | ||
if (branches !== true) { | ||
let branArr = branches.split(','); | ||
for (var i in entry) { | ||
let fit = false; | ||
for (var j = 0; j < branArr.length; j++) { | ||
let reg = new RegExp('^' + './src/app/' + branArr[j]); | ||
if (reg.test(entry[i])) { | ||
fit = true; | ||
break; | ||
} | ||
} | ||
if (!fit) { | ||
delete entry[i]; | ||
} | ||
} | ||
} | ||
// | ||
fs.writeFileSync(Path.join(pwd, './.keel/entry.js'), 'module.exports = ' + JSON.stringify(entry)); | ||
@@ -62,9 +80,9 @@ console.log(chalk.cyan(`[finish] scanEntry`)); | ||
exports.dev = function (process, pwd) { | ||
exports.dev = function (process, pwd, branches) { | ||
console.log(chalk.cyan(`[build:dev]`)); | ||
scanEntry(pwd); | ||
scanEntry(pwd, branches); | ||
startGulp({ | ||
isDev: true, | ||
pwd | ||
}) | ||
}); | ||
} | ||
@@ -71,0 +89,0 @@ |
@@ -15,6 +15,8 @@ /** | ||
const webpack = require('webpack'); | ||
const webpackEntry = require('./.keel/entry.js'); | ||
webpackEntry.vendor = ['react', 'react-dom']; | ||
const webpackCof = { | ||
entry: require('./.keel/entry.js'), | ||
entry: webpackEntry, | ||
output: { | ||
@@ -28,7 +30,6 @@ filename: './app/[name].js', | ||
test: /.jsx?$/, | ||
loader: 'babel-loader', | ||
query: { | ||
loader: 'babel-loader?' + JSON.stringify({ | ||
compact: false, | ||
presets: ['es2015', 'react', 'stage-3'] | ||
} | ||
}) | ||
}, { | ||
@@ -44,7 +45,7 @@ test: /\.scss$/, | ||
new webpack.optimize.UglifyJsPlugin(), | ||
new wk.optimize.CommonsChunkPlugin({ | ||
new webpack.optimize.CommonsChunkPlugin({ | ||
name: 'vendor' // Specify the common bundle's name. | ||
}) | ||
] : [ | ||
new wk.optimize.CommonsChunkPlugin({ | ||
new webpack.optimize.CommonsChunkPlugin({ | ||
name: 'vendor' // Specify the common bundle's name. | ||
@@ -51,0 +52,0 @@ }) |
{ | ||
"name": "do-keel", | ||
"version": "1.0.5", | ||
"description": "[构建中,请勿使用] keel 是基于react.js的脚手架,可以一键生成react项目的环境。", | ||
"version": "1.0.6", | ||
"description": "[构建中,谨慎使用] keel 是基于react.js的脚手架,可以一键生成react项目的环境。", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "bin": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18058
17
299
4