Clean workspace dependencies and add no-build option to strapi dev

This commit is contained in:
Alexandre Bodin 2019-05-03 17:19:01 +02:00
parent 918fc8b05d
commit ba7b58558e
5 changed files with 31 additions and 1218 deletions

View File

@ -3,48 +3,17 @@
"version": "3.0.0-alpha.26.2",
"dependencies": {},
"devDependencies": {
"@babel/core": "^7.4.3",
"@babel/plugin-proposal-class-properties": "^7.4.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/polyfill": "^7.4.3",
"@babel/preset-env": "^7.4.3",
"@babel/preset-react": "^7.0.0",
"assert": "~1.3.0",
"axios": "^0.18.0",
"babel-cli": "6.26.0",
"babel-eslint": "^6.1.2",
"babel-jest": "^24.1.0",
"babel-loader": "7.1.1",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-es2015-destructuring": "^6.23.0",
"babel-plugin-transform-es2015-parameters": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-react-constant-elements": "^6.23.0",
"babel-plugin-transform-react-inline-elements": "^6.22.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.18",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"chalk": "^2.4.1",
"cross-env": "^5.2.0",
"cypress": "3.1.2",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.12.1",
"eslint": "^4.19.1",
"eslint-plugin-babel": "^4.0.0",
"eslint-plugin-react": "^7.7.0",
"eslint-plugin-redux-saga": "^0.8.0",
"execa": "^1.0.0",
"istanbul": "~0.4.2",
"jest": "^24.5.0",
"jest-cli": "^24.5.0",
"lerna": "^3.13.1",
"lodash": "^4.17.5",
"prettier": "^1.16.4",
"pretty-quick": "^1.10.0",
"request": "^2.87.0",
"request-promise-native": "^1.0.7",
"shelljs": "^0.7.7",
"snyk": "^1.99.0",
"wait-on": "^3.2.0",
"yargs": "^13.2.2"

View File

@ -81,6 +81,7 @@ program
// `$ strapi dev`
program
.command('dev')
.option('--no-build', 'Disable build', false)
.description('Start your Strapi application in dev mode')
.action(getScript('dev'));

View File

@ -28,7 +28,7 @@ const { cli, logger } = require('strapi-utils');
* (fire up the application in our working directory).
*/
module.exports = async function() {
module.exports = async function({ build}) {
// Check that we're in a valid Strapi project.
if (!cli.isStrapiApp()) {
return console.log(
@ -38,8 +38,8 @@ module.exports = async function() {
const appPath = process.cwd();
if (!fs.existsSync(path.join(appPath, 'build'))) {
console.log(`> No ${cyan('build')} dir found. Strating build`);
if (build && !fs.existsSync(path.join(appPath, 'build'))) {
console.log(`> No ${cyan('build')} dir found. Starting build`);
execa.shellSync('npm run -s build', {
stdio: 'inherit',
});

View File

@ -49,7 +49,7 @@ const generateTestApp = async ({ appName, database }) => {
* @param {string} options.appName - Name of the app / folder in which run the start script
*/
const startTestApp = ({ appName }) => {
return execa.shell('strapi dev', {
return execa.shell('strapi dev --no-build', {
stdio: 'inherit',
cwd: path.resolve(appName),
});

1209
yarn.lock

File diff suppressed because it is too large Load Diff