Prechádzať zdrojové kódy

build: rename build/ to scripts/

Evan You 8 rokov pred
rodič
commit
144a4dd860

+ 1 - 1
.flowconfig

@@ -1,7 +1,7 @@
 [ignore]
 .*/node_modules/.*
 .*/test/.*
-.*/build/.*
+.*/scripts/.*
 .*/examples/.*
 .*/benchmarks/.*
 

+ 3 - 3
.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.
 

+ 13 - 13
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": {

+ 0 - 0
build/alias.js → scripts/alias.js


+ 0 - 0
build/build.js → scripts/build.js


+ 0 - 0
build/config.js → scripts/config.js


+ 0 - 0
build/gen-release-note.js → scripts/gen-release-note.js


+ 0 - 0
build/get-weex-version.js → scripts/get-weex-version.js


+ 0 - 0
build/git-hooks/commit-msg → scripts/git-hooks/commit-msg


+ 0 - 0
build/git-hooks/pre-commit → scripts/git-hooks/pre-commit


+ 0 - 0
build/release-weex.sh → scripts/release-weex.sh


+ 0 - 0
build/release.sh → scripts/release.sh


+ 0 - 0
build/setup.js → scripts/setup.js


+ 1 - 1
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 = {