diff --git a/.gitignore b/.gitignore
index d4935a6..0d1d23e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@
/include
/icon
/node_modules
+.pytest_cache/
*.pyc
pip-selfcheck.json
*.sublime-project
diff --git a/package.json b/package.json
index ff3ac89..063d248 100644
--- a/package.json
+++ b/package.json
@@ -4,17 +4,18 @@
"description": "Reader and Editor for Hypertext",
"main": "app.js",
"scripts": {
- "build": "webpack --config webpack.config.js",
- "watch": "webpack --config webpack.config.js --watch",
+ "build": "webpack --config webpack.prod.js --mode=production",
+ "watch": "webpack --config webpack.dev.js --watch --mode=development",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Alex Hunt",
"license": "ISC",
"dependencies": {
- "bootstrap": "^4.0.0-beta.2",
+ "bootstrap": "^4.1.0",
"draft-js": "^0.10.4",
"draft-js-export-html": "^1.2.0",
"draft-js-import-html": "^1.2.1",
+ "file-loader": "^1.1.11",
"font-awesome": "^4.7.0",
"object-assign": "^4.1.1",
"popper.js": "^1.12.6",
@@ -40,7 +41,10 @@
"sass-loader": "^6.0.6",
"style-loader": "^0.19.0",
"sync-exec": "^0.6.2",
- "webpack": "^3.8.1",
- "webpack-bundle-size-analyzer": "^2.7.0"
+ "webpack": "^4.6.0",
+ "webpack-bundle-analyzer": "^2.11.1",
+ "webpack-bundle-size-analyzer": "^2.7.0",
+ "webpack-cli": "^2.0.15",
+ "webpack-merge": "^4.1.2"
}
}
diff --git a/src/components/navbar.js b/src/components/navbar.js
index 622970a..97aef9d 100644
--- a/src/components/navbar.js
+++ b/src/components/navbar.js
@@ -13,7 +13,10 @@ const Navbar = () =>
Notes
-
+
+
+ Search
+
diff --git a/src/stylesheets/_texteditor.scss b/src/stylesheets/_texteditor.scss
index 7bd8d6c..e790bea 100644
--- a/src/stylesheets/_texteditor.scss
+++ b/src/stylesheets/_texteditor.scss
@@ -39,7 +39,7 @@
}
#editor_content div {
- overflow: scroll;
+ // overflow: scroll;
}
#editor_topbar button img {
diff --git a/webpack.config.js b/webpack.common.js
similarity index 85%
rename from webpack.config.js
rename to webpack.common.js
index 78de56a..7994334 100644
--- a/webpack.config.js
+++ b/webpack.common.js
@@ -28,26 +28,18 @@ module.exports = {
rootAssetPath + 'stylesheets/' + 'search.scss'
]
},
- output: {
- publicPath: "/static/js/",
- filename: '[name].[hash].js',
- path: path.resolve(__dirname, 'static/js/')
- },
- watch: true,
- watchOptions: {
- poll: true,
- ignored: [
- /node_modules/,
- /DS_Store/
- ]
- },
+ // output: {
+ // publicPath: "/static/js/",
+ // filename: '[name].[hash].js',
+ // path: path.resolve(__dirname, 'static/js/')
+ // },
module : {
rules: [
{
test: /\.(js)$/,
exclude: [
/node_modules/,
- /DS_Store/
+ /\.DS_Store/
],
use: {
loader: 'babel-loader',
@@ -66,7 +58,7 @@ module.exports = {
test: /\.(scss)$/,
exclude: [
/node_modules/,
- /DS_Store/
+ /\.DS_Store/
],
use: [{
loader: 'style-loader',
@@ -92,8 +84,6 @@ module.exports = {
}
]},
plugins: [
- // TODO: Dev / Prod Config
- // new webpack.optimize.UglifyJsPlugin(),
new ManifestRevisionPlugin(path.join('static/', 'manifest.json'), {
rootAssetPath: rootAssetPath
}),
diff --git a/webpack.dev.js b/webpack.dev.js
new file mode 100644
index 0000000..4407b79
--- /dev/null
+++ b/webpack.dev.js
@@ -0,0 +1,21 @@
+const merge = require('webpack-merge');
+const common = require('./webpack.common.js');
+const path = require('path')
+
+module.exports = merge(common, {
+ output: {
+ publicPath: "/static/js/",
+ filename: '[name].[hash].js',
+ path: path.resolve(__dirname, 'static/js/')
+ },
+ // devServer: {
+ // contentBase: '.',
+ // hot: true
+ // },
+ watch: true,
+ watchOptions: {
+ poll: true,
+ ignored: /node_modules/
+ },
+ // new webpack.optimize.UglifyJsPlugin(),
+});
\ No newline at end of file
diff --git a/webpack.prod.js b/webpack.prod.js
new file mode 100644
index 0000000..a0b4108
--- /dev/null
+++ b/webpack.prod.js
@@ -0,0 +1,24 @@
+const webpack = require('webpack');
+const merge = require('webpack-merge');
+const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
+const common = require('./webpack.common.js');
+const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
+const path = require('path')
+
+module.exports = merge(common, {
+ output: {
+ publicPath: "/dist/js/",
+ filename: '[name].js',
+ path: path.resolve(__dirname, 'dist/js/')
+ },
+ optimization: {
+ minimize: true
+ },
+ plugins: [
+ new UglifyJSPlugin(),
+ new BundleAnalyzerPlugin,
+ new webpack.LoaderOptionsPlugin({
+ minimize: true,
+ })
+ ]
+});
\ No newline at end of file