Skip to content
Snippets Groups Projects
Commit 4a5d7c09 authored by Alexander Rose's avatar Alexander Rose
Browse files

added watching for shader files

parent aa480d5a
No related branches found
No related tags found
No related merge requests found
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
}, },
"scripts": { "scripts": {
"lint": "tslint src/**/*.ts", "lint": "tslint src/**/*.ts",
"build": "tsc", "build": "cpx \"src/**/*.{vert,frag,glsl}\" build/node_modules/ && tsc",
"postbuild": "copyfiles --up 1 src/mol-gl/shader/*.vert src/mol-gl/shader/*.frag src/mol-gl/shader/*.glsl build/node_modules/",
"watch": "tsc -watch", "watch": "tsc -watch",
"watch-shader": "cpx \"src/**/*.{vert,frag,glsl}\" build/node_modules/ --watch",
"test": "jest", "test": "jest",
"script": "node build/node_modules/script.js", "script": "node build/node_modules/script.js",
"app-render-test": "webpack build/node_modules/apps/render-test/index.js --mode development -o web/render-test/index.js", "app-render-test": "webpack build/node_modules/apps/render-test/index.js --mode development -o web/render-test/index.js",
...@@ -62,6 +62,8 @@ ...@@ -62,6 +62,8 @@
"@types/react-dom": "^16.0.4", "@types/react-dom": "^16.0.4",
"benchmark": "^2.1.4", "benchmark": "^2.1.4",
"copyfiles": "^2.0.0", "copyfiles": "^2.0.0",
"cpx": "^1.5.0",
"extra-watch-webpack-plugin": "^1.0.1",
"glslify-import": "^3.1.0", "glslify-import": "^3.1.0",
"glslify-loader": "^1.0.2", "glslify-loader": "^1.0.2",
"jest": "^22.4.2", "jest": "^22.4.2",
......
const path = require('path'); const path = require('path');
const ExtraWatchWebpackPlugin = require('extra-watch-webpack-plugin');
module.exports = { module.exports = {
module: { module: {
rules: [ rules: [
...@@ -13,5 +14,10 @@ module.exports = { ...@@ -13,5 +14,10 @@ module.exports = {
include: [ path.resolve(__dirname, "build/node_modules/") ] include: [ path.resolve(__dirname, "build/node_modules/") ]
} }
] ]
} },
plugins: [
new ExtraWatchWebpackPlugin({
files: [ './**/*.vert', './**/*.frag', './**/*.glsl' ],
}),
],
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment