Преглед на файлове

fullcalendar.css using webpack

Adam Shaw преди 8 години
родител
ревизия
395aa4db4b
променени са 4 файла, в които са добавени 20 реда и са изтрити 11 реда
  1. 2 0
      package.json
  2. 0 10
      src.json
  3. 9 0
      src/main.ts
  4. 9 1
      tasks/webpack/createConfig.js

+ 2 - 0
package.json

@@ -32,8 +32,10 @@
     "awesome-typescript-loader": "^3.3.0",
     "awesome-typescript-loader": "^3.3.0",
     "bootstrap": "^3.3.7",
     "bootstrap": "^3.3.7",
     "components-jqueryui": "github:components/jqueryui",
     "components-jqueryui": "github:components/jqueryui",
+    "css-loader": "^0.28.7",
     "del": "^2.2.1",
     "del": "^2.2.1",
     "dts-generator": "^2.1.0",
     "dts-generator": "^2.1.0",
+    "extract-text-webpack-plugin": "^3.0.2",
     "gulp": "^3.9.1",
     "gulp": "^3.9.1",
     "gulp-concat": "^2.6.0",
     "gulp-concat": "^2.6.0",
     "gulp-cssmin": "^0.1.7",
     "gulp-cssmin": "^0.1.7",

+ 0 - 10
src.json

@@ -1,14 +1,4 @@
 {
 {
-  "fullcalendar.css": [
-    "common/common.css",
-    "common/common.standard.css",
-    "common/common.jquery-ui.css",
-    "common/common.bootstrap3.css",
-    "main.css",
-    "basic/basic.css",
-    "agenda/agenda.css",
-    "list/list.css"
-  ],
   "fullcalendar.print.css": [
   "fullcalendar.print.css": [
     "common/print.css"
     "common/print.css"
   ]
   ]

+ 9 - 0
src/main.ts

@@ -12,6 +12,15 @@ import './basic/config'
 import './agenda/config'
 import './agenda/config'
 import './list/config'
 import './list/config'
 
 
+// css
+import "./common/common.css"
+import "./common/common.standard.css"
+import "./common/common.jquery-ui.css"
+import "./common/common.bootstrap3.css"
+import "./main.css"
+import "./basic/basic.css"
+import "./agenda/agenda.css"
+import "./list/list.css"
 
 
 declare global {
 declare global {
 	interface JQueryStatic {
 	interface JQueryStatic {

+ 9 - 1
tasks/webpack/createConfig.js

@@ -1,5 +1,6 @@
 const path = require('path')
 const path = require('path')
 const StringReplacePlugin = require('string-replace-webpack-plugin')
 const StringReplacePlugin = require('string-replace-webpack-plugin')
+const ExtractTextPlugin = require("extract-text-webpack-plugin")
 
 
 // `CheckerPlugin` is optional. Use it if you want async error reporting.
 // `CheckerPlugin` is optional. Use it if you want async error reporting.
 // We need this plugin to detect a `--watch` mode. It may be removed later
 // We need this plugin to detect a `--watch` mode. It may be removed later
@@ -78,13 +79,20 @@ module.exports = function(/* settings, settings, settings */) {
 							}
 							}
 						]
 						]
 					})
 					})
+				},
+				{
+					test: /\.css$/,
+					loader: ExtractTextPlugin.extract({
+						use: 'css-loader'
+					})
 				}
 				}
 			]
 			]
 		},
 		},
 
 
 		plugins: [
 		plugins: [
 			new CheckerPlugin(),
 			new CheckerPlugin(),
-			new StringReplacePlugin()
+			new StringReplacePlugin(),
+			new ExtractTextPlugin('[name].css')
 		],
 		],
 
 
 		externals: externals,
 		externals: externals,