Merge pull request #2046 from iminoso/add-static

Fix bugs with Webpack in Dockerfile
This commit is contained in:
Ian Minoso 2016-10-28 12:20:23 -04:00 committed by GitHub
commit 6ae13096c7
3 changed files with 12 additions and 11 deletions

View file

@ -71,12 +71,14 @@ RUN chmod +x /usr/local/bin/prometheus-aggregator
# Install Webpack, Typescript, React # Install Webpack, Typescript, React
RUN ln -s /usr/bin/nodejs /usr/bin/node RUN ln -s /usr/bin/nodejs /usr/bin/node
ADD package.json package.json ADD package.json package.json
ADD tsconfig.json tsconfig.json
ADD webpack.config.js webpack.config.js ADD webpack.config.js webpack.config.js
ADD typings.json typings.json ADD typings.json typings.json
RUN npm install RUN npm install
RUN npm link typescript RUN npm link typescript
# Add static files # Add static files
ADD static static
ADD static/js/directives/components static/dist/components ADD static/js/directives/components static/dist/components
# Run Webpack # Run Webpack

View file

@ -4,7 +4,7 @@
"private": true, "private": true,
"version": "1.0.0", "version": "1.0.0",
"scripts": { "scripts": {
"build": "./node_modules/.bin/webpack", "build": "./node_modules/.bin/webpack --progress -p -v",
"watch": "./node_modules/.bin/webpack --watch" "watch": "./node_modules/.bin/webpack --watch"
}, },
"repository": { "repository": {
@ -20,13 +20,13 @@
"css-loader": "0.25.0", "css-loader": "0.25.0",
"ngreact": "0.3.0", "ngreact": "0.3.0",
"react": "15.3.2", "react": "15.3.2",
"react-dom": "^15.3.2", "react-dom": "15.3.2",
"style-loader": "0.13.1", "style-loader": "0.13.1",
"typescript": "2.0.3" "typescript": "2.0.3"
}, },
"devDependencies": { "devDependencies": {
"source-map-loader": "0.1.5", "source-map-loader": "0.1.5",
"ts-loader": "0.8.2", "ts-loader": "0.9.5",
"typings": "1.4.0", "typings": "1.4.0",
"webpack": "1.13.2" "webpack": "1.13.2"
} }

View file

@ -2,15 +2,14 @@
"compilerOptions": { "compilerOptions": {
"jsx": "react", "jsx": "react",
"module": "commonjs", "module": "commonjs",
"noImplicitAny": true,
"outDir": "./build/", "outDir": "./build/",
"preserveConstEnums": true, "target": "es5",
"removeComments": true, "sourceMap": true
"target": "ES5"
}, },
"exclude": [ "exclude": [
"node_modules", "node_modules"
"typings/browser.d.ts", ],
"typings/browser" "include": [
"./static/js/**/*.tsx"
] ]
} }