+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Posted on 2018-05-25
+
+
+ Our Changing Planet
+
+
+ 8 332 Hits
+ 26 Comments
+ Child
+
+
+ Visit ten places on our planet that are undergoing the biggest changes
+ today.
+
+
+
+
+
+
+
+
![](https://view.moezx.cc/images/2019/10/21/5e65o9lxtbvht2tdjvpgsmarw.jpg)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
![](https://view.moezx.cc/images/2019/10/21/1owb0inchnbrhkamrpk10a2ff.jpg)
+
+
+
+
+
+ Posted on 2018-05-25
+
+
+ Our Changing Planet
+
+
+ 8 332 Hits
+ 26 Comments
+ Child
+
+
+ Visit ten places on our planet that are undergoing the biggest changes
+ today.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dist/manifest.json b/dist/manifest.json
new file mode 100644
index 0000000..0f574a9
--- /dev/null
+++ b/dist/manifest.json
@@ -0,0 +1 @@
+{"main":{"css":["./css/bundle.css"],"js":["./js/bundle.js"]}}
\ No newline at end of file
diff --git a/dist/style.css b/dist/style.css
new file mode 100644
index 0000000..e871192
--- /dev/null
+++ b/dist/style.css
@@ -0,0 +1,12 @@
+/*!
+ * Theme Name: Sakura
+ * Theme URI: https://2heng.xin
+ * Description: A Wonderful WordPress Theme Sakura 🌸
+ * Version: 4.0.0
+ * Author: Mashiro
+ * Author URI: https://2heng.xin
+ * Tags: HTML5, CSS3, Webpack, framework
+ *
+ * License: MIT
+ * License URI: http://opensource.org/licenses/mit-license.php
+ */
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 1cde306..1c298f0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1902,6 +1902,11 @@
"resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
"integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c="
},
+ "ast-types": {
+ "version": "0.9.6",
+ "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.6.tgz",
+ "integrity": "sha1-ECyenpAF0+fjgpvwxPok7oYu6bk="
+ },
"async": {
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz",
@@ -2390,7 +2395,6 @@
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/camel-case/download/camel-case-3.0.0.tgz",
"integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=",
- "dev": true,
"requires": {
"no-case": "^2.2.0",
"upper-case": "^1.1.1"
@@ -2480,6 +2484,11 @@
"tslib": "^1.9.0"
}
},
+ "chunks-2-json-webpack-plugin": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/chunks-2-json-webpack-plugin/-/chunks-2-json-webpack-plugin-1.0.2.tgz",
+ "integrity": "sha512-SJupWpTR5gCoEhYWfAb6gUPJc192BLeeDeZ6NitjxKEALiYGv3+I6RbwgSsTuUhHY1q5i1HPQuLRPaC+d1p77w=="
+ },
"cipher-base": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
@@ -2514,7 +2523,6 @@
"version": "4.2.1",
"resolved": "https://registry.npm.taobao.org/clean-css/download/clean-css-4.2.1.tgz",
"integrity": "sha1-LUEe92uFabbQyEBo2r6FsKpeXBc=",
- "dev": true,
"requires": {
"source-map": "~0.6.0"
}
@@ -3672,6 +3680,15 @@
"ext": "^1.1.2"
}
},
+ "es6-templates": {
+ "version": "0.2.3",
+ "resolved": "https://registry.npmjs.org/es6-templates/-/es6-templates-0.2.3.tgz",
+ "integrity": "sha1-XLmsn7He1usSOTQrgdeSu7QHjuQ=",
+ "requires": {
+ "recast": "~0.11.12",
+ "through": "~2.3.6"
+ }
+ },
"escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
@@ -4050,6 +4067,11 @@
"loader-utils": "^1.1.0"
}
},
+ "fastparse": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz",
+ "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ=="
+ },
"faye-websocket": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz",
@@ -5068,8 +5090,7 @@
"he": {
"version": "1.2.0",
"resolved": "https://registry.npm.taobao.org/he/download/he-1.2.0.tgz",
- "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=",
- "dev": true
+ "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8="
},
"hmac-drbg": {
"version": "1.0.1",
@@ -5110,11 +5131,22 @@
"resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz",
"integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8="
},
+ "html-loader": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/html-loader/-/html-loader-0.5.5.tgz",
+ "integrity": "sha512-7hIW7YinOYUpo//kSYcPB6dCKoceKLmOwjEMmhIobHuWGDVl0Nwe4l68mdG/Ru0wcUxQjVMEoZpkalZ/SE7zog==",
+ "requires": {
+ "es6-templates": "^0.2.3",
+ "fastparse": "^1.1.1",
+ "html-minifier": "^3.5.8",
+ "loader-utils": "^1.1.0",
+ "object-assign": "^4.1.1"
+ }
+ },
"html-minifier": {
"version": "3.5.21",
"resolved": "https://registry.npm.taobao.org/html-minifier/download/html-minifier-3.5.21.tgz",
"integrity": "sha1-0AQOBUcw41TbAIRjWTGUAVIS0gw=",
- "dev": true,
"requires": {
"camel-case": "3.0.x",
"clean-css": "4.2.x",
@@ -5128,14 +5160,12 @@
"commander": {
"version": "2.17.1",
"resolved": "https://registry.npm.taobao.org/commander/download/commander-2.17.1.tgz?cache=0&sync_timestamp=1572603184853&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.17.1.tgz",
- "integrity": "sha1-vXerfebelCBc6sxy8XFtKfIKd78=",
- "dev": true
+ "integrity": "sha1-vXerfebelCBc6sxy8XFtKfIKd78="
},
"uglify-js": {
"version": "3.4.10",
"resolved": "https://registry.npm.taobao.org/uglify-js/download/uglify-js-3.4.10.tgz",
"integrity": "sha1-mtlWPY6zrN+404WX0q8dgV9qdV8=",
- "dev": true,
"requires": {
"commander": "~2.19.0",
"source-map": "~0.6.1"
@@ -5144,8 +5174,7 @@
"commander": {
"version": "2.19.0",
"resolved": "https://registry.npm.taobao.org/commander/download/commander-2.19.0.tgz?cache=0&sync_timestamp=1572603184853&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.19.0.tgz",
- "integrity": "sha1-9hmKqE5bg8RgVLlN3tv+1e6f8So=",
- "dev": true
+ "integrity": "sha1-9hmKqE5bg8RgVLlN3tv+1e6f8So="
}
}
}
@@ -5912,8 +5941,7 @@
"lower-case": {
"version": "1.1.4",
"resolved": "https://registry.npm.taobao.org/lower-case/download/lower-case-1.1.4.tgz",
- "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=",
- "dev": true
+ "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw="
},
"lru-cache": {
"version": "4.1.5",
@@ -6378,7 +6406,6 @@
"version": "2.3.2",
"resolved": "https://registry.npm.taobao.org/no-case/download/no-case-2.3.2.tgz",
"integrity": "sha1-YLgTOWvjmz8SiKTB7V0efSi0ZKw=",
- "dev": true,
"requires": {
"lower-case": "^1.1.1"
}
@@ -6855,7 +6882,6 @@
"version": "2.1.1",
"resolved": "https://registry.npm.taobao.org/param-case/download/param-case-2.1.1.tgz",
"integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=",
- "dev": true,
"requires": {
"no-case": "^2.2.0"
}
@@ -7190,8 +7216,7 @@
"private": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
- "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==",
- "dev": true
+ "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg=="
},
"process": {
"version": "0.11.10",
@@ -7418,6 +7443,29 @@
"readable-stream": "^2.0.2"
}
},
+ "recast": {
+ "version": "0.11.23",
+ "resolved": "https://registry.npmjs.org/recast/-/recast-0.11.23.tgz",
+ "integrity": "sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM=",
+ "requires": {
+ "ast-types": "0.9.6",
+ "esprima": "~3.1.0",
+ "private": "~0.1.5",
+ "source-map": "~0.5.0"
+ },
+ "dependencies": {
+ "esprima": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz",
+ "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM="
+ },
+ "source-map": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
+ }
+ }
+ },
"redent": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
@@ -7527,8 +7575,7 @@
"relateurl": {
"version": "0.2.7",
"resolved": "https://registry.npm.taobao.org/relateurl/download/relateurl-0.2.7.tgz",
- "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=",
- "dev": true
+ "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk="
},
"remove-trailing-separator": {
"version": "1.1.0",
@@ -8669,6 +8716,11 @@
}
}
},
+ "through": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
+ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
+ },
"through2": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
@@ -9048,8 +9100,7 @@
"upper-case": {
"version": "1.1.3",
"resolved": "https://registry.npm.taobao.org/upper-case/download/upper-case-1.1.3.tgz",
- "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=",
- "dev": true
+ "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg="
},
"uri-js": {
"version": "4.2.2",
diff --git a/package.json b/package.json
index 76f7cef..3d4a2ab 100644
--- a/package.json
+++ b/package.json
@@ -13,11 +13,13 @@
"@material/ripple": "^3.2.0",
"@material/textfield": "^3.2.0",
"@material/theme": "^3.1.0",
+ "chunks-2-json-webpack-plugin": "^1.0.2",
"cpx": "^1.5.0",
"cross-env": "^6.0.3",
"css-loader": "^3.2.0",
"extract-loader": "^3.1.0",
"file-loader": "^4.2.0",
+ "html-loader": "^0.5.5",
"material-components-web": "^3.2.0",
"node-sass": "^4.13.0",
"parallax-js": "^3.1.0",
diff --git a/src/index.html b/src/index.html
index 5f687e1..7c23185 100644
--- a/src/index.html
+++ b/src/index.html
@@ -56,7 +56,7 @@
- Posted on 2018-05-25
+ Posted on 2019-05-25
Our Changing Planet
diff --git a/src/package.less b/src/package.less
new file mode 100644
index 0000000..e871192
--- /dev/null
+++ b/src/package.less
@@ -0,0 +1,12 @@
+/*!
+ * Theme Name: Sakura
+ * Theme URI: https://2heng.xin
+ * Description: A Wonderful WordPress Theme Sakura 🌸
+ * Version: 4.0.0
+ * Author: Mashiro
+ * Author URI: https://2heng.xin
+ * Tags: HTML5, CSS3, Webpack, framework
+ *
+ * License: MIT
+ * License URI: http://opensource.org/licenses/mit-license.php
+ */
\ No newline at end of file
diff --git a/src/php/functions.php b/src/php/functions.php
new file mode 100644
index 0000000..e69de29
diff --git a/src/php/index.php b/src/php/index.php
new file mode 100644
index 0000000..5f687e1
--- /dev/null
+++ b/src/php/index.php
@@ -0,0 +1,139 @@
+
+
+
+
+ Sakura v2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Posted on 2018-05-25
+
+
+ Our Changing Planet
+
+
+ 8 332 Hits
+ 26 Comments
+ Child
+
+
+ Visit ten places on our planet that are undergoing the biggest changes
+ today.
+
+
+
+
+
+
+
+
![](https://view.moezx.cc/images/2019/10/21/5e65o9lxtbvht2tdjvpgsmarw.jpg)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
![](https://view.moezx.cc/images/2019/10/21/1owb0inchnbrhkamrpk10a2ff.jpg)
+
+
+
+
+
+ Posted on 2018-05-25
+
+
+ Our Changing Planet
+
+
+ 8 332 Hits
+ 26 Comments
+ Child
+
+
+ Visit ten places on our planet that are undergoing the biggest changes
+ today.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/webpack.config.js b/webpack.config.js
index 4f4acce..6b6d5e0 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,12 +1,11 @@
const path = require('path');
const autoprefixer = require('autoprefixer');
const TerserPlugin = require('terser-webpack-plugin');
-// const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
+const Chunks2JsonPlugin = require('chunks-2-json-webpack-plugin');
-// still not work...
-// const imgOutputPath = process.env.ENV_MODE === "build" ? 'images/[name].[ext]' : '../images/[name].[ext]';
+// const OutputPath = process.env.ENV_MODE
module.exports = [{
mode: "development", // "production" | "development" | "none"
@@ -19,13 +18,13 @@ module.exports = [{
},
devtool: 'inline-source-map',
devServer: {
- contentBase: path.join(__dirname, './dist'), //编译打包文件的位置
+ contentBase: path.join(__dirname, './dist'),
publicPath: '/',
- port: 8080, //服务器端口号
+ port: 8080,
host: '0.0.0.0',
- // proxy: {}, //代理列表
+ // proxy: {},
compress: true,
- // historyApiFallback: true, //开启服务器history重定向模式
+ // historyApiFallback: true,
},
module: {
rules: [{
@@ -46,27 +45,8 @@ module.exports = [{
},
{
test: /\.scss$/,
- use: [
- // no need with MiniCssExtractPlugin
- // {
- // loader: 'file-loader',
- // options: {
- // name: './css/bundle.css',
- // // outputPath: './css',
- // },
- // },
- // bug with file-loader: https://github.com/webpack-contrib/css-loader/issues/864#issuecomment-445815198
- // {
- // loader: 'extract-loader'
- // },
- {
- loader: MiniCssExtractPlugin.loader,
- // options: {
- // // you can specify a publicPath here
- // // by default it uses publicPath in webpackOptions.output
- // publicPath: '../',
- // hmr: process.env.NODE_ENV === 'development',
- // },
+ use: [{
+ loader: MiniCssExtractPlugin.loader
},
{
loader: 'css-loader'
@@ -97,7 +77,7 @@ module.exports = [{
},
}, ],
exclude: /node_modules/
- },
+ }
]
},
resolve: {
@@ -111,28 +91,31 @@ module.exports = [{
// },
plugins: [
new CopyPlugin([
- // { from: './src/images', to: './images' },
+ {
+ from: './src/package.less',
+ to: './style.css',
+ toType: 'file',
+ },
{
from: './src/*.html',
to: './[name].[ext]',
toType: 'template',
},
+ {
+ from: './src/php/*.php',
+ to: './[name].[ext]',
+ toType: 'template',
+ }
]),
- // new HtmlWebpackPlugin({
- // filename: 'index.html',
- // template: './src/index.html',
- // chunks: ['index']
- // }),
- // new HtmlWebpackPlugin({
- // filename: 'single.html',
- // template: './src/single.html',
- // chunks: ['single']
- // })
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
- filename: "css/bundle.css",
+ filename: "./css/bundle.css",
// chunkFilename: "[id].css"
+ }),
+ new Chunks2JsonPlugin({
+ outputDir: 'dist/',
+ filename: 'manifest.json'
})
- ]
+ ],
}];
\ No newline at end of file