Permalink
Browse files

wip: project restructure #110

  • Loading branch information...
1 parent d724d97 commit dbba6d7c999731b48677ad1262f95802c0b7a872 @mseemann committed Oct 2, 2016
Showing with 546 additions and 580 deletions.
  1. +0 −57 angular-cli-build.js
  2. +0 −32 angular-cli.json
  3. +0 −3 config/environment.dev.ts
  4. +0 −13 config/environment.js
  5. +0 −3 config/environment.prod.ts
  6. +8 −0 config/webpack/util.js
  7. +81 −0 config/webpack/webpack.common.js
  8. +25 −0 config/webpack/webpack.dev.js
  9. +39 −0 config/webpack/webpack.prod.js
  10. +4 −3 dev-scripts/generate-scss-from-mdl-scss.js
  11. +0 −17 dev-scripts/hint.txt
  12. 0 e2e/{tsconfig.json → tsconfig_e2e.json}
  13. +0 −1 e2e/typings.d.ts
  14. +30 −14 package.json
  15. +0 −125 src/app/card/card.component.ts
  16. +0 −33 src/components/table/mdl-table.ts
  17. +1 −1 src/{ → demo-app}/404.html
  18. +4 −2 src/{ → demo-app}/app/abstract-demo.component.ts
  19. 0 src/{ → demo-app}/app/animations/flyInOutTrigger-animation.ts
  20. +1 −1 src/{ → demo-app}/app/app-module.ts
  21. 0 src/{ → demo-app}/app/app.component.html
  22. +1 −1 src/{ → demo-app}/app/app.component.scss
  23. +3 −3 src/{ → demo-app}/app/app.component.spec.ts
  24. +2 −4 src/{ → demo-app}/app/app.component.ts
  25. 0 src/{ → demo-app}/app/badge/badge.component.html
  26. +3 −4 src/{ → demo-app}/app/badge/badge.component.ts
  27. 0 src/{ → demo-app}/app/button/button.component.html
  28. +2 −3 src/{ → demo-app}/app/button/button.component.ts
  29. 0 src/{ → demo-app}/app/card/card.component.html
  30. +74 −0 src/demo-app/app/card/card.component.scss
  31. +47 −0 src/demo-app/app/card/card.component.ts
  32. +2 −2 src/{ → demo-app}/app/chips/chips.component.html
  33. +3 −4 src/{ → demo-app}/app/chips/chips.component.ts
  34. +0 −1 src/{ → demo-app}/app/dialog/dialog.component.html
  35. +5 −6 src/{ → demo-app}/app/dialog/dialog.component.ts
  36. +2 −3 src/{ → demo-app}/app/dialog/login-dialog.component.ts
  37. 0 src/{ → demo-app}/app/dialog/login-dialog.html
  38. 0 src/{ → demo-app}/app/environment.ts
  39. 0 src/{ → demo-app}/app/home.html
  40. 0 src/{ → demo-app}/app/icon/icon.component.html
  41. +0 −1 src/{ → demo-app}/app/icon/icon.component.ts
  42. 0 src/{ → demo-app}/app/index.ts
  43. 0 src/{ → demo-app}/app/layout/layout.component.html
  44. +3 −8 src/{ → demo-app}/app/layout/layout.component.ts
  45. 0 src/{ → demo-app}/app/list/list.component.html
  46. +0 −1 src/{ → demo-app}/app/list/list.component.ts
  47. 0 src/{ → demo-app}/app/loading/loading.component.html
  48. +3 −4 src/{ → demo-app}/app/loading/loading.component.ts
  49. 0 src/{ → demo-app}/app/menus/menu.component.html
  50. +3 −4 src/{ → demo-app}/app/menus/menu.component.ts
  51. 0 src/{ → demo-app}/app/prism/index.ts
  52. 0 src/{ → demo-app}/app/prism/package.json
  53. 0 src/{ → demo-app}/app/prism/prism.component.ts
  54. 0 src/{ → demo-app}/app/prism/prism.vendor.ts
  55. 0 src/{ → demo-app}/app/reactiveforms/reactiveform.component.html
  56. +3 −4 src/{ → demo-app}/app/reactiveforms/reactiveform.component.ts
  57. 0 src/{ → demo-app}/app/shadow/shadow.component.html
  58. +3 −4 src/{ → demo-app}/app/shadow/shadow.component.ts
  59. 0 src/{ → demo-app}/app/slider/slider.component.html
  60. +3 −4 src/{ → demo-app}/app/slider/slider.component.ts
  61. 0 src/{ → demo-app}/app/snackbar/snackbar.component.html
  62. +4 −5 src/{ → demo-app}/app/snackbar/snackbar.component.ts
  63. 0 src/{ → demo-app}/app/tables/table.component.html
  64. +4 −5 src/{ → demo-app}/app/tables/table.component.ts
  65. 0 src/{ → demo-app}/app/tabs/tabs.component.html
  66. +3 −4 src/{ → demo-app}/app/tabs/tabs.component.ts
  67. 0 src/{ → demo-app}/app/textfield/textfield.component.html
  68. +3 −4 src/{ → demo-app}/app/textfield/textfield.component.ts
  69. 0 src/{ → demo-app}/app/theme/theme.component.html
  70. +14 −8 src/{ → demo-app}/app/theme/theme.component.ts
  71. 0 src/{ → demo-app}/app/toggle/toggle.component.html
  72. +3 −4 src/{ → demo-app}/app/toggle/toggle.component.ts
  73. +3 −3 src/{ → demo-app}/app/tooltip/tooltip.component.html
  74. +2 −3 src/{ → demo-app}/app/tooltip/tooltip.component.ts
  75. BIN src/{ → demo-app}/assets/oslo.jpg
  76. BIN src/{ → demo-app}/assets/richter.jpg
  77. BIN src/{ → demo-app}/assets/sund.jpg
  78. BIN src/{ → demo-app}/assets/wood.jpg
  79. 0 src/{ → demo-app/css}/prism.css
  80. +8 −2 src/{main.scss → demo-app/css/style.scss}
  81. BIN src/{ → demo-app}/favicon.ico
  82. +4 −21 src/{index.html → demo-app/index.hbs}
  83. +28 −0 src/demo-app/main.ts
  84. +11 −0 src/demo-app/polyfills.ts
  85. +9 −0 src/demo-app/vendor.ts
  86. 0 src/{ → lib}/components/badge/mdl-badge.directive.spec.ts
  87. 0 src/{ → lib}/components/badge/mdl-badge.directive.ts
  88. +1 −1 src/{ → lib}/components/button/mdl-button.component.spec.ts
  89. +2 −2 src/{ → lib}/components/button/mdl-button.component.ts
  90. 0 src/{ → lib}/components/card/mdl-card.component.spec.ts
  91. +1 −1 src/{ → lib}/components/card/mdl-card.component.ts
  92. 0 src/{ → lib}/components/checkbox/mdl-checkbox.component.spec.ts
  93. +1 −1 src/{ → lib}/components/checkbox/mdl-checkbox.component.ts
  94. +1 −1 src/{ → lib}/components/chips/index.ts
  95. 0 src/{ → lib}/components/chips/mdl-chip-contact.directive.spec.ts
  96. +1 −1 src/{ → lib}/components/chips/mdl-chip-contact.directive.ts
  97. 0 src/{ → lib}/components/chips/mdl-chip.component.spec.ts
  98. 0 src/{ → lib}/components/chips/mdl-chip.component.ts
  99. 0 src/{ → lib}/components/common/append-view-container-ref-directive.ts
  100. 0 src/{ → lib}/components/common/boolean-property.spec.ts
  101. 0 src/{ → lib}/components/common/boolean-property.ts
  102. 0 src/{ → lib}/components/common/index.ts
  103. 0 src/{ → lib}/components/common/mdl-error.ts
  104. +2 −2 src/{ → lib}/components/common/mdl-ripple.directive.spec.ts
  105. 0 src/{ → lib}/components/common/mdl-ripple.directive.ts
  106. 0 src/{ → lib}/components/common/number.property.spec.ts
  107. 0 src/{ → lib}/components/common/number.property.ts
  108. 0 src/{ → lib}/components/common/ripple.vendor.ts
  109. 0 src/{ → lib}/components/dialog/index.ts
  110. 0 src/{ → lib}/components/dialog/internal-dialog-reference.ts
  111. 0 src/{ → lib}/components/dialog/mdl-dialog-configuration.ts
  112. 0 src/{ → lib}/components/dialog/mdl-dialog-host.component.ts
  113. 0 src/{ → lib}/components/dialog/mdl-dialog.component.ts
  114. 0 src/{ → lib}/components/dialog/mdl-dialog.service.spec.ts
  115. 0 src/{ → lib}/components/dialog/mdl-dialog.service.ts
  116. 0 src/{ → lib}/components/icon-toggle/mdl-icon-toggle.component.spec.ts
  117. +2 −2 src/{ → lib}/components/icon-toggle/mdl-icon-toggle.component.ts
  118. 0 src/{ → lib}/components/icon/mdl-icon.component.spec.ts
  119. 0 src/{ → lib}/components/icon/mdl-icon.component.ts
  120. 0 src/{ → lib}/components/index.ts
  121. +3 −3 src/{ → lib}/components/layout/index.ts
  122. 0 src/{ → lib}/components/layout/mdl-layout-content.component.spec.ts
  123. 0 src/{ → lib}/components/layout/mdl-layout-content.component.ts
  124. 0 src/{ → lib}/components/layout/mdl-layout-drawer.component.spec.ts
  125. 0 src/{ → lib}/components/layout/mdl-layout-drawer.component.ts
  126. 0 src/{ → lib}/components/layout/mdl-layout-header-row.component.spec.ts
  127. 0 src/{ → lib}/components/layout/mdl-layout-header-row.component.ts
  128. 0 src/{ → lib}/components/layout/mdl-layout-header-transparent.directive.spec.ts
  129. 0 src/{ → lib}/components/layout/mdl-layout-header-transparent.directive.ts
  130. 0 src/{ → lib}/components/layout/mdl-layout-header.component.spec.ts
  131. 0 src/{ → lib}/components/layout/mdl-layout-header.component.ts
  132. 0 src/{ → lib}/components/layout/mdl-layout-spacer.component.spec.ts
  133. 0 src/{ → lib}/components/layout/mdl-layout-spacer.component.ts
  134. 0 src/{ → lib}/components/layout/mdl-layout-tab-panel.component.spec.ts
  135. +1 −1 src/{ → lib}/components/layout/mdl-layout-tab-panel.component.ts
  136. 0 src/{ → lib}/components/layout/mdl-layout-title.component.spec.ts
  137. 0 src/{ → lib}/components/layout/mdl-layout-title.component.ts
  138. +2 −2 src/{ → lib}/components/layout/mdl-layout.component.spec.ts
  139. +3 −3 src/{ → lib}/components/layout/mdl-layout.component.ts
  140. 0 src/{ → lib}/components/list/mdl-list.component.spec.ts
  141. +2 −2 src/{ → lib}/components/list/mdl-list.component.ts
  142. 0 src/{ → lib}/components/menu/index.ts
  143. 0 src/{ → lib}/components/menu/mdl-menu-item.component.spec.ts
  144. +1 −1 src/{ → lib}/components/menu/mdl-menu-item.component.ts
  145. 0 src/{ → lib}/components/menu/mdl-menu-item.directive.spec.ts
  146. 0 src/{ → lib}/components/menu/mdl-menu-item.directive.ts
  147. +1 −1 src/{ → lib}/components/menu/mdl-menu.component.spec.ts
  148. +2 −2 src/{ → lib}/components/menu/mdl-menu.component.ts
  149. 0 src/{ → lib}/components/progress/mdl-progress.component.spec.ts
  150. +1 −1 src/{ → lib}/components/progress/mdl-progress.component.ts
  151. 0 src/{ → lib}/components/radio/mdl-radio.component.spec.ts
  152. +1 −1 src/{ → lib}/components/radio/mdl-radio.component.ts
  153. 0 src/{ → lib}/components/shadow/mdl-shadow.directive.spec.ts
  154. +2 −2 src/{ → lib}/components/shadow/mdl-shadow.directive.ts
  155. 0 src/{ → lib}/components/slider/mdl-slider.component.spec.ts
  156. +1 −1 src/{ → lib}/components/slider/mdl-slider.component.ts
  157. 0 src/{ → lib}/components/snackbar/mdl-snackbar.service.spec.ts
  158. 0 src/{ → lib}/components/snackbar/mdl-snackbar.service.ts
  159. 0 src/{ → lib}/components/spinner/mdl-spinner.component.spec.ts
  160. +1 −1 src/{ → lib}/components/spinner/mdl-spinner.component.ts
  161. 0 src/{ → lib}/components/switch/mdl-switch.component.spec.ts
  162. +1 −1 src/{ → lib}/components/switch/mdl-switch.component.ts
  163. +2 −3 src/{ → lib}/components/table/index.ts
  164. +1 −1 src/{ → lib}/components/table/mdl-table.component.spec.ts
  165. +32 −4 src/{ → lib}/components/table/mdl-table.component.ts
  166. 0 src/{ → lib}/components/table/mdl-table.spec.ts
  167. +2 −2 src/{ → lib}/components/tabs/index.ts
  168. 0 src/{ → lib}/components/tabs/mdl-tab-panel-title.component.ts
  169. 0 src/{ → lib}/components/tabs/mdl-tab-panel.component.spec.ts
  170. 0 src/{ → lib}/components/tabs/mdl-tab-panel.component.ts
  171. 0 src/{ → lib}/components/tabs/mdl-tabs.component.spec.ts
  172. +2 −2 src/{ → lib}/components/tabs/mdl-tabs.component.ts
  173. +1 −1 src/{ → lib}/components/textfield/mdl-textfield.component.spec.ts
  174. +4 −4 src/{ → lib}/components/textfield/mdl-textfield.component.ts
  175. 0 src/{ → lib}/components/tooltip/index.ts
  176. 0 src/{ → lib}/components/tooltip/mdl-tooltip-position.service.spec.ts
  177. 0 src/{ → lib}/components/tooltip/mdl-tooltip-position.service.ts
  178. 0 src/{ → lib}/components/tooltip/mdl-tooltip.component.spec.ts
  179. +1 −1 src/{ → lib}/components/tooltip/mdl-tooltip.component.ts
  180. 0 src/{ → lib}/components/tooltip/mdl-tooltip.directive.ts
  181. 0 src/{ → lib}/scss/_color-definitions.scss
  182. 0 src/{ → lib}/scss/_functions.scss
  183. 0 src/{ → lib}/scss/_mixins.scss
  184. 0 src/{ → lib}/scss/_variables.scss
  185. 0 src/{ → lib}/scss/extensions/main.scss
  186. 0 src/{ → lib}/scss/extensions/tabs/_tabs.scss
  187. 0 src/{ → lib}/scss/image-fix.scss
  188. 0 src/{ → lib}/scss/material-design-lite-grid.scss
  189. 0 src/{ → lib}/scss/material-design-lite.scss
  190. 0 src/{ → lib}/scss/mdl/_color-definitions.scss
  191. 0 src/{ → lib}/scss/mdl/_functions.scss
  192. 0 src/{ → lib}/scss/mdl/_mixins.scss
  193. 0 src/{ → lib}/scss/mdl/_variables.scss
  194. 0 src/{ → lib}/scss/mdl/animation/_animation.scss
  195. 0 src/{ → lib}/scss/mdl/badge/_badge.scss
  196. 0 src/{ → lib}/scss/mdl/button/_button.scss
  197. 0 src/{ → lib}/scss/mdl/card/_card.scss
  198. 0 src/{ → lib}/scss/mdl/checkbox/_checkbox.scss
  199. 0 src/{ → lib}/scss/mdl/chip/_chip.scss
  200. 0 src/{ → lib}/scss/mdl/data-table/_data-table.scss
  201. 0 src/{ → lib}/scss/mdl/dialog/_dialog.scss
  202. 0 src/{ → lib}/scss/mdl/footer/_mega_footer.scss
  203. 0 src/{ → lib}/scss/mdl/footer/_mini_footer.scss
  204. 0 src/{ → lib}/scss/mdl/grid/_grid.scss
  205. 0 src/{ → lib}/scss/mdl/icon-toggle/_icon-toggle.scss
  206. 0 src/{ → lib}/scss/mdl/layout/_layout.scss
  207. 0 src/{ → lib}/scss/mdl/list/_list.scss
  208. 0 src/{ → lib}/scss/mdl/material-design-lite-grid.scss
  209. 0 src/{ → lib}/scss/mdl/material-design-lite.scss
  210. 0 src/{ → lib}/scss/mdl/menu/_menu.scss
  211. 0 src/{ → lib}/scss/mdl/palette/_palette.scss
  212. 0 src/{ → lib}/scss/mdl/progress/_progress.scss
  213. 0 src/{ → lib}/scss/mdl/radio/_radio.scss
  214. 0 src/{ → lib}/scss/mdl/resets/_h5bp.scss
  215. 0 src/{ → lib}/scss/mdl/resets/_mobile.scss
  216. 0 src/{ → lib}/scss/mdl/resets/_resets.scss
  217. 0 src/{ → lib}/scss/mdl/ripple/_ripple.scss
  218. 0 src/{ → lib}/scss/mdl/shadow/_shadow.scss
  219. 0 src/{ → lib}/scss/mdl/slider/_slider.scss
  220. 0 src/{ → lib}/scss/mdl/snackbar/_snackbar.scss
  221. 0 src/{ → lib}/scss/mdl/spinner/_spinner.scss
  222. 0 src/{ → lib}/scss/mdl/styleguide.scss
  223. 0 src/{ → lib}/scss/mdl/switch/_switch.scss
  224. 0 src/{ → lib}/scss/mdl/tabs/_tabs.scss
  225. 0 src/{ → lib}/scss/mdl/template.scss
  226. 0 src/{ → lib}/scss/mdl/textfield/_textfield.scss
  227. 0 src/{ → lib}/scss/mdl/tooltip/_tooltip.scss
  228. 0 src/{ → lib}/scss/mdl/typography/_typography.scss
  229. +0 −4 src/main.ts
  230. +0 −67 src/system-config.ts
  231. +16 −21 src/tsconfig.json
  232. +0 −2 src/typings.d.ts
  233. +0 −10 typings.json
  234. +1 −0 webpack.config.js
View
@@ -1,57 +0,0 @@
-/* global require, module */
-'use strict';
-require('ts-node/register');
-
-var autoprefixer = require('broccoli-autoprefixer');
-
-const MergeTree = require('broccoli-merge-trees');
-const Funnel = require('broccoli-funnel');
-const Angular2App = require('angular-cli/lib/broccoli/angular2-app');
-
-
-function _buildE2EAppInputTree() {
- return new MergeTree([
- new Funnel('typings', {
- destDir: 'typings'
- }),
- new Funnel('src', {
- include: ['components/**/*'],
- destDir: 'src'
- }),
- new Funnel('src/e2e-app', {
- destDir: 'src/e2e-app'
- })
- ]);
-}
-
-module.exports = function(defaults) {
-
- var inputNode = _buildE2EAppInputTree();
-
- var app = new Angular2App(defaults, {
- //sourceDir: 'src/e2e-app',
- polyfills: [
- 'vendor/core-js/client/core.js',
- 'vendor/systemjs/dist/system.src.js',
- 'vendor/zone.js/dist/zone.js',
- 'vendor/web-animations-js/web-animations.min.js'
- ],
- tsCompiler: {},
- sassCompiler: {
- includePaths: [
- 'src/scss'
- ]
- },
- vendorNpmFiles: [
- 'systemjs/dist/system-polyfills.js',
- 'systemjs/dist/system.src.js',
- 'zone.js/dist/*.+(js|js.map)',
- 'core-js/client/core.js',
- 'rxjs/**/*.+(js|js.map)',
- '@angular/**/*.+(js|js.map)',
- 'web-animations-js/**/*'
- ]
- });
-
- return autoprefixer(app, { browsers: ['last 2 version'] });
-};
View
@@ -1,32 +0,0 @@
-{
- "project": {
- "version": "1.0.0-beta.6",
- "name": "angular2-mdl"
- },
- "apps": [
- {
- "main": "src/main.ts",
- "tsconfig": "src/tsconfig.json",
- "mobile": false
- }
- ],
- "addons": [],
- "packages": [],
- "e2e": {
- "protractor": {
- "config": "config/protractor.conf.js"
- }
- },
- "test": {
- "karma": {
- "config": "config/karma.conf.js"
- }
- },
- "defaults": {
- "prefix": "app",
- "sourceDir": "src",
- "styleExt": "css",
- "prefixInterfaces": false,
- "lazyRoutePrefix": "+"
- }
-}
@@ -1,3 +0,0 @@
-export const environment = {
- production: false
-};
View
@@ -1,13 +0,0 @@
-// Angular-CLI server configuration
-// Unrelated to environment.dev|prod.ts
-
-/* jshint node: true */
-
-module.exports = function(environment) {
- return {
- environment: environment,
- baseURL: '/',
- locationType: 'auto'
- };
-};
-
@@ -1,3 +0,0 @@
-export const environment = {
- production: true
-};
@@ -0,0 +1,8 @@
+var path = require('path');
+var _root = path.resolve(__dirname, '../..');
+
+function root(args) {
+ args = Array.prototype.slice.call(arguments, 0);
+ return path.join.apply(path, [_root].concat(args));
+}
+exports.root = root;
@@ -0,0 +1,81 @@
+var webpack = require('webpack');
+var HtmlWebpackPlugin = require('html-webpack-plugin');
+var ExtractTextPlugin = require('extract-text-webpack-plugin');
+var CopyWebpackPlugin = require('copy-webpack-plugin');
+var util = require('./util');
+var autoprefixer = require('autoprefixer');
+
+module.exports = {
+
+ entry: {
+ 'polyfills': './src/demo-app/polyfills.ts',
+ 'vendor': './src/demo-app/vendor.ts',
+ 'app': './src/demo-app/main.ts'
+ },
+
+ resolve: {
+ extensions: ['.js', '.ts'],
+ //mainFields: ["module", "main", "browser"]
+ },
+
+ // avoid errors like Error: Can't resolve 'net' in '...angular2-mdl/node_modules/debug'
+ node: {
+ fs: 'empty',
+ net: 'empty'
+ },
+
+ module: {
+ loaders: [
+ {
+ test: /\.ts$/,
+ loaders: ['awesome-typescript-loader?tsconfig=./src/tsconfig.json', 'angular2-template-loader']
+ },
+ {
+ test: /\.html$/,
+ loader: 'html'
+ },
+ {
+ test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
+ loader: 'file?name=assets/[name].[ext]'
+ },
+ {
+ test: /\.scss$|\.sass$/,
+ include: [util.root('src', 'demo-app', 'css')],
+ loaders: [
+ ExtractTextPlugin.extract({ fallbackLoader: 'style-loader', loader: 'css-loader?sourceMap' }),
+ 'css-loader',
+ 'postcss-loader',
+ 'sass-loader']
+ },
+ {
+ test: /\.scss$/,
+ include: [util.root('src', 'demo-app', 'app'), util.root('src', 'lib', 'components')],
+ loaders: ['raw-loader', 'postcss-loader', 'sass-loader']
+ },
+ {
+ test: /\.hbs$/,
+ loader: 'handlebars'
+ }
+ ]
+ },
+
+
+ plugins: [
+ new CopyWebpackPlugin([{ from: util.root('src', 'demo-app', 'assets') , to: 'assets'}], {copyUnmodified: true}),
+ new webpack.optimize.CommonsChunkPlugin({
+ name: ['app', 'vendor', 'polyfills']
+ }),
+ new webpack.LoaderOptionsPlugin({
+ options: {
+ postcss: function () {
+ return [autoprefixer];
+ }
+ }
+ }),
+ new HtmlWebpackPlugin({
+ template: '!!handlebars!src/demo-app/index.hbs',
+ baseUrl: process.env.NODE_ENV == 'production' ? '/angular2-mdl/' : '/',
+ production: process.env.NODE_ENV == 'production' ? true : false
+ })
+ ]
+};
@@ -0,0 +1,25 @@
+var webpackMerge = require('webpack-merge');
+var ExtractTextPlugin = require('extract-text-webpack-plugin');
+var commonConfig = require('./webpack.common.js');
+var util = require('./util');
+
+module.exports = webpackMerge(commonConfig, {
+ devtool: 'cheap-module-eval-source-map',
+
+ output: {
+ path: util.root('dist'),
+ publicPath: 'http://localhost:4200/',
+ filename: '[name].js',
+ chunkFilename: '[id].chunk.js'
+ },
+
+ plugins: [
+ new ExtractTextPlugin('[name].css')
+ ],
+
+ devServer: {
+ historyApiFallback: true,
+ stats: 'minimal',
+ port: 4200
+ }
+});
@@ -0,0 +1,39 @@
+var webpack = require('webpack');
+var webpackMerge = require('webpack-merge');
+var ExtractTextPlugin = require('extract-text-webpack-plugin');
+var CopyWebpackPlugin = require('copy-webpack-plugin');
+var commonConfig = require('./webpack.common.js');
+var util = require('./util');
+
+const ENV = process.env.NODE_ENV = process.env.ENV = 'production';
+
+module.exports = webpackMerge(commonConfig, {
+ devtool: 'source-map',
+
+ output: {
+ path: util.root('dist'),
+ publicPath: '',
+ filename: '[name].[hash].js',
+ chunkFilename: '[id].[hash].chunk.js'
+ },
+
+ plugins: [
+ new CopyWebpackPlugin([{ from: util.root('src', 'demo-app', '404.html') }], {copyUnmodified: true}),
+ new webpack.NoErrorsPlugin(),
+ // waiting for fix: https://github.com/webpack/webpack/issues/2644
+ // new webpack.optimize.DedupePlugin(),
+ new webpack.LoaderOptionsPlugin({
+ minimize: true,
+ debug: false
+ }),
+ new webpack.optimize.UglifyJsPlugin({
+ comments: false
+ }),
+ new ExtractTextPlugin('[name].[hash].css'),
+ new webpack.DefinePlugin({
+ 'process.env': {
+ 'ENV': JSON.stringify(ENV)
+ }
+ })
+ ]
+});
@@ -8,12 +8,13 @@ const path = require('path');
const glob = require('glob');
const ncp = require('ncp').ncp;
+const destPath = 'src/lib/scss/mdl';
var basePath = process.cwd();
var source = path.resolve(basePath, 'node_modules/material-design-lite/src');
-var dest = path.resolve(basePath, 'src/scss/mdl');
+var dest = path.resolve(basePath, destPath);
-fs.mkdirSync('src/scss/mdl');
+fs.mkdirSync(destPath);
ncp(source, dest, {filter: function(fileName){
if(fileName.endsWith('snippets')){
@@ -22,7 +23,7 @@ ncp(source, dest, {filter: function(fileName){
if(fs.statSync(fileName).isDirectory()){
return true;
}
- return fileName.endsWith('.scss') || fileName.endsWith('.scss');
+ return fileName.endsWith('.scss');
}}, function (err) {
if (err) {
return console.error(err);
View
@@ -1,17 +0,0 @@
-checkbox:
-$svg-tick-image: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU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Y1NjI1LDAuNTIwNjI1IDAuMzIzMTI1LDAuNjk3NSAwLjg1MzQzNzUsMC4xNjcxODc1IHoiDQogICAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPg0KICAgIDwvbWFzaz4NCiAgPC9kZWZzPg0KICA8cmVjdA0KICAgICB3aWR0aD0iMSINCiAgICAgaGVpZ2h0PSIxIg0KICAgICB4PSIwIg0KICAgICB5PSIwIg0KICAgICBjbGlwLXBhdGg9InVybCgjY2xpcCkiDQogICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmUiIC8+DQo8L3N2Zz4=';
-
- mask: url("#{$svg-tick-mask-iamge}");
- -webkit-mask: url("#{$svg-tick-mask-iamge}");
-
- $checkbox-color url("#{$svg-tick-image}");
-
- $checkbox-disabled-color url("#{$svg-tick-image}");
-
-progress:
-
-$progress-buffer-image: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSI0IiB2aWV3UG9ydD0iMCAwIDEyIDQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPGVsbGlwc2UgY3g9IjIiIGN5PSIyIiByeD0iMiIgcnk9IjIiPg0KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN4IiBmcm9tPSIyIiB0bz0iLTEwIiBkdXI9IjAuNnMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPg0KICA8L2VsbGlwc2U+DQogIDxlbGxpcHNlIGN4PSIxNCIgY3k9IjIiIHJ4PSIyIiByeT0iMiIgY2xhc3M9ImxvYWRlciI+DQogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iY3giIGZyb209IjE0IiB0bz0iMiIgZHVyPSIwLjZzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4NCiAgPC9lbGxpcHNlPg0KPC9zdmc+';
-
- mask: url('#{$progress-buffer-image}');
- -webkit-mask: url('#{$progress-buffer-image}');
File renamed without changes.
View
@@ -1 +0,0 @@
-/// <reference path="../typings/index.d.ts" />
Oops, something went wrong.

0 comments on commit dbba6d7

Please sign in to comment.