diff --git a/.flowconfig b/.flowconfig index b070e08f..2d6f9a73 100644 --- a/.flowconfig +++ b/.flowconfig @@ -1,7 +1,7 @@ [ignore] .*/node_modules/.* .*/test/.* -.*/build/.* +.*/scripts/.* .*/examples/.* .*/benchmarks/.* diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 4f140719..8a0a3091 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -75,11 +75,11 @@ The default test script will do the following: lint with ESLint -> type check wi ## Project Structure -- **`build`**: contains build-related configuration files. In most cases you don't need to touch them. However, it would be helpful to familiarize yourself with the following files: +- **`scripts`**: contains build-related scripts and configuration files. In most cases you don't need to touch them. However, it would be helpful to familiarize yourself with the following files: - - `build/alias.js`: module import aliases used across all source code and tests. + - `scripts/alias.js`: module import aliases used across all source code and tests. - - `build/config.js`: contains the build configurations for all files found in `dist/`. Check this file if you want to find out the entry source file for a dist file. + - `scripts/config.js`: contains the build configurations for all files found in `dist/`. Check this file if you want to find out the entry source file for a dist file. - **`dist`**: contains built files for distribution. Note this directory is only updated when a release happens; they do not reflect the latest changes in development branches. diff --git a/package.json b/package.json index b20976a2..dbd65c7f 100644 --- a/package.json +++ b/package.json @@ -13,16 +13,16 @@ "types/*.d.ts" ], "scripts": { - "dev": "rollup -w -c build/config.js --environment TARGET:web-full-dev", - "dev:cjs": "rollup -w -c build/config.js --environment TARGET:web-runtime-cjs", - "dev:esm": "rollup -w -c build/config.js --environment TARGET:web-runtime-esm", + "dev": "rollup -w -c scripts/config.js --environment TARGET:web-full-dev", + "dev:cjs": "rollup -w -c scripts/config.js --environment TARGET:web-runtime-cjs", + "dev:esm": "rollup -w -c scripts/config.js --environment TARGET:web-runtime-esm", "dev:test": "karma start test/unit/karma.dev.config.js", - "dev:ssr": "rollup -w -c build/config.js --environment TARGET:web-server-renderer", - "dev:compiler": "rollup -w -c build/config.js --environment TARGET:web-compiler ", - "dev:weex": "rollup -w -c build/config.js --environment TARGET:weex-framework", - "dev:weex:factory": "rollup -w -c build/config.js --environment TARGET:weex-factory", - "dev:weex:compiler": "rollup -w -c build/config.js --environment TARGET:weex-compiler ", - "build": "node build/build.js", + "dev:ssr": "rollup -w -c scripts/config.js --environment TARGET:web-server-renderer", + "dev:compiler": "rollup -w -c scripts/config.js --environment TARGET:web-compiler ", + "dev:weex": "rollup -w -c scripts/config.js --environment TARGET:weex-framework", + "dev:weex:factory": "rollup -w -c scripts/config.js --environment TARGET:weex-factory", + "dev:weex:compiler": "rollup -w -c scripts/config.js --environment TARGET:weex-compiler ", + "build": "node scripts/build.js", "build:ssr": "npm run build -- web-runtime-cjs,web-server-renderer", "build:weex": "npm run build -- weex", "test": "npm run lint && flow check && npm run test:types && npm run test:cover && npm run test:e2e -- --env phantomjs && npm run test:ssr && npm run test:weex", @@ -37,10 +37,10 @@ "flow": "flow check", "sauce": "karma start test/unit/karma.sauce.config.js", "bench:ssr": "npm run build:ssr && node benchmarks/ssr/renderToString.js && node benchmarks/ssr/renderToStream.js", - "release": "bash build/release.sh", - "release:weex": "bash build/release-weex.sh", - "release:note": "node build/gen-release-note.js", - "setup": "node build/setup.js", + "release": "bash scripts/release.sh", + "release:weex": "bash scripts/release-weex.sh", + "release:note": "node scripts/gen-release-note.js", + "setup": "node scripts/setup.js", "commit": "git-cz" }, "repository": { diff --git a/build/alias.js b/scripts/alias.js similarity index 100% rename from build/alias.js rename to scripts/alias.js diff --git a/build/build.js b/scripts/build.js similarity index 100% rename from build/build.js rename to scripts/build.js diff --git a/build/config.js b/scripts/config.js similarity index 100% rename from build/config.js rename to scripts/config.js diff --git a/build/gen-release-note.js b/scripts/gen-release-note.js similarity index 100% rename from build/gen-release-note.js rename to scripts/gen-release-note.js diff --git a/build/get-weex-version.js b/scripts/get-weex-version.js similarity index 100% rename from build/get-weex-version.js rename to scripts/get-weex-version.js diff --git a/build/git-hooks/commit-msg b/scripts/git-hooks/commit-msg similarity index 100% rename from build/git-hooks/commit-msg rename to scripts/git-hooks/commit-msg diff --git a/build/git-hooks/pre-commit b/scripts/git-hooks/pre-commit similarity index 100% rename from build/git-hooks/pre-commit rename to scripts/git-hooks/pre-commit diff --git a/build/release-weex.sh b/scripts/release-weex.sh similarity index 100% rename from build/release-weex.sh rename to scripts/release-weex.sh diff --git a/build/release.sh b/scripts/release.sh similarity index 100% rename from build/release.sh rename to scripts/release.sh diff --git a/build/setup.js b/scripts/setup.js similarity index 100% rename from build/setup.js rename to scripts/setup.js diff --git a/test/unit/karma.base.config.js b/test/unit/karma.base.config.js index 24b4a6ad..b3f0df26 100644 --- a/test/unit/karma.base.config.js +++ b/test/unit/karma.base.config.js @@ -1,4 +1,4 @@ -var alias = require('../../build/alias') +var alias = require('../../scripts/alias') var webpack = require('webpack') var webpackConfig = {