Przeglądaj źródła

Merge pull request #333 from leonbubova/main

Update  build scripts, .gitignore and docs
Dmitrii Selivanov 3 lat temu
rodzic
commit
f1daa81686
4 zmienionych plików z 11 dodań i 6 usunięć
  1. 3 0
      .gitignore
  2. 5 3
      CONTRIBUTING.md
  3. 3 2
      package.json
  4. 0 1
      webpack.config.js

+ 3 - 0
.gitignore

@@ -29,3 +29,6 @@ yarn-error.log*
 *.sw*
 
 node_modules
+
+# Build files
+Extensions/combined/bundled-content-script.js

+ 5 - 3
CONTRIBUTING.md

@@ -25,10 +25,12 @@ npm install
 2. Run the following command to create `bundled-content-script.js` which is used in `manifest.json`
 
 ```
-npm run bundle
-```
+npm start // to create the build file(s) and start a file watcher that hot-reloads on save
+
+// or
 
-This will also start a watcher that re-bundles automatically once you save a file inside the source.
+npm run build // to create the build file(s) once
+```
 
 Congratulations, You are now ready to develop!
 

+ 3 - 2
package.json

@@ -4,8 +4,9 @@
   "description": "Chrome extension to return youtube dislikes",
   "main": "ryd.content-script.js",
   "scripts": {
-    "test": "echo \"Error: no test specified\" && exit 1",
-    "bundle": "node_modules/.bin/webpack \"./Extensions/combined/ryd.content-script.js\" -o \"./Extensions/combined\""
+    "start": "node_modules/.bin/webpack \"./Extensions/combined/ryd.content-script.js\" -o \"./Extensions/combined\" --watch",
+    "build": "node_modules/.bin/webpack \"./Extensions/combined/ryd.content-script.js\" -o \"./Extensions/combined\"",
+    "test": "echo \"Error: no test specified\" && exit 1"
   },
   "repository": {
     "type": "git",

+ 0 - 1
webpack.config.js

@@ -10,5 +10,4 @@ module.exports = {
     ramda: "R",
   },
   module: {},
-  watch: true
 };