Skip to content

Commit

Permalink
Merge pull request #518 from unchartedsoftware/feature/dependency-update
Browse files Browse the repository at this point in the history
Feature/dependency update
  • Loading branch information
Ghnuberath authored Nov 7, 2019
2 parents 273c156 + b9fa887 commit 178135b
Show file tree
Hide file tree
Showing 47 changed files with 7,311 additions and 6,027 deletions.
10 changes: 5 additions & 5 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"presets": ["env"],
"presets": ["@babel/preset-env"],
"plugins": [
"babel-plugin-transform-decorators-legacy",
["@babel/plugin-proposal-decorators", {"legacy": true}],
"babel-plugin-preact-require",
"babel-plugin-transform-class-properties",
["transform-react-jsx", {"pragma":"h"}],
"babel-plugin-transform-object-rest-spread",
"babel-plugin-transform-runtime"
["@babel/plugin-transform-react-jsx", {"pragma":"h"}],
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-transform-runtime"
]
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ The following co-requisites must be part of your JS build in order to use Lex:
```js
{
"element-resize-detector": "1.1.x", // developed against "1.1.15"
"preact": "8.x", // developed against: "8.4.2",
"preact": "8.x", // developed against: "8.5.2",
"moment": "2.x", // developed aginst: "2.24.0"
"moment-timezone": "0.5.x", // developed against "0.5.23"
"flatpickr": "4.5.x" // developed against: "4.5.2"
"flatpickr": "4.6.x" // developed against: "4.6.3"
}
```

Expand Down
27 changes: 12 additions & 15 deletions config/webpack.config.build.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
const webpack = require('webpack');
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');

const MINIFY = process.env.MINIFY ? [
new webpack.optimize.UglifyJsPlugin({
cache: true,
parallel: true,
sourceMap: true
})
] : [];
const MiniCssExtractPlugin = require('mini-css-extract-plugin');

const OUTFILE = process.env.MINIFY ? 'lex.min.js' : 'lex.js';

module.exports = {
mode: 'production',
devtool: 'source-map',
entry: './src/lex.jsx',
output: {
Expand All @@ -21,7 +13,10 @@ module.exports = {
libraryTarget: 'commonjs2',
path: path.resolve(__dirname, '../dist')
},
plugins: [new ExtractTextPlugin({filename: 'lex.css'}), ...MINIFY],
optimization: {
minimize: process.env.MINIFY !== undefined
},
plugins: [new MiniCssExtractPlugin({filename: 'lex.css'})],
module: {
rules: [
{
Expand All @@ -31,10 +26,12 @@ module.exports = {
},
{
test: /\.scss$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: ['css-loader', 'sass-loader']
})
use: [{
loader: MiniCssExtractPlugin.loader,
options: {
hmr: false
}
}, 'css-loader', 'sass-loader']
}
]
},
Expand Down
5 changes: 3 additions & 2 deletions config/webpack.config.watch.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require('path');
const webpack = require('webpack');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const fs = require('fs');

const testFolder = path.resolve(__dirname, '../demo');
Expand All @@ -16,6 +16,7 @@ const entry = fs.readdirSync(testFolder)
}, {});

module.exports = {
mode: 'development',
devtool: 'inline-source-map',
entry: entry,
output: {
Expand Down Expand Up @@ -72,7 +73,7 @@ module.exports = {
]
},
plugins: [
new CleanWebpackPlugin(['dist']),
new CleanWebpackPlugin({cleanOnceBeforeBuildPatterns: path.join(process.cwd(), 'dist/**')}),
new webpack.NamedModulesPlugin(),
new webpack.HotModuleReplacementPlugin()
],
Expand Down
2 changes: 1 addition & 1 deletion demo/async-options.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @jsx h */
/* @jsx h */
import { h } from 'preact';
import { Lex, ValueState, ValueStateValue, TextEntryState } from '../src/lex';
import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
Expand Down
2 changes: 1 addition & 1 deletion demo/container.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @jsx h */
/* @jsx h */
import { h } from 'preact';
import { Lex, ValueState, ValueStateValue, TextEntryState, TextRelationState } from '../src/lex';
import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
Expand Down
2 changes: 1 addition & 1 deletion demo/datetime-picker.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @jsx h */
/* @jsx h */
import { h } from 'preact';
import { Lex, TransitionFactory, ValueState, ValueStateValue, LabelState, DateTimeRelationState, DateTimeEntryState } from '../src/lex';
import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
Expand Down
2 changes: 1 addition & 1 deletion demo/dev-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @jsx h */
/* @jsx h */
import { h } from 'preact';
import { Lex, TransitionFactory, TokenSuggestionState, TokenSuggestionStateValue, ValueState, ValueStateValue, TextRelationState, NumericRelationState, TextEntryState, CurrencyEntryState, LabelState, DateTimeRelationState, DateTimeEntryState, EnumEntryState, EnumEntryStateValue, Action, ActionButton } from '../src/lex';
import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
Expand Down
2 changes: 1 addition & 1 deletion demo/free-text-search.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @jsx h */
/* @jsx h */
import { h } from 'preact';
import { Lex, TokenSuggestionState, TokenSuggestionStateValue, TransitionFactory, ValueState, ValueStateValue, TextEntryState, NumericEntryState } from '../src/lex';
import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
Expand Down
2 changes: 1 addition & 1 deletion demo/icon-override.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @jsx h */
/* @jsx h */
import { h } from 'preact';
import { Lex, TransitionFactory, ValueState, ValueStateValue, TextEntryState, NumericEntryState, NumericRelationState, LabelState } from '../src/lex';
import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
Expand Down
2 changes: 1 addition & 1 deletion demo/multi-string.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @jsx h */
/* @jsx h */
import { h } from 'preact';
import { Lex, ValueState, ValueStateValue, TextEntryState } from '../src/lex';
import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
Expand Down
2 changes: 1 addition & 1 deletion demo/optionally-terminal-state.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @jsx h */
/* @jsx h */
import { h } from 'preact';
import { Lex, ValueState, ValueStateValue, TerminalState, TextEntryState, TransitionFactory } from '../src/lex';
import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
Expand Down
2 changes: 1 addition & 1 deletion demo/relational-number.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @jsx h */
/* @jsx h */
import { h } from 'preact';
import { Lex, TransitionFactory, LabelState, ValueState, ValueStateValue, NumericEntryState, NumericRelationState } from '../src/lex';
import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
Expand Down
2 changes: 1 addition & 1 deletion demo/relational-string.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @jsx h */
/* @jsx h */
import { h } from 'preact';
import { Lex, ValueState, ValueStateValue, TextEntryState, TextRelationState } from '../src/lex';
import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
Expand Down
2 changes: 1 addition & 1 deletion demo/simple-label.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @jsx h */
/* @jsx h */
import { h } from 'preact';
import { Lex, ValueState, ValueStateValue, NumericEntryState, LabelState } from '../src/lex';
import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
Expand Down
2 changes: 1 addition & 1 deletion demo/simple-multitype.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @jsx h */
/* @jsx h */
import { h } from 'preact';
import { Lex, TransitionFactory, ValueState, ValueStateValue, TextEntryState, NumericEntryState } from '../src/lex';
import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
Expand Down
2 changes: 1 addition & 1 deletion demo/simple-number-units.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @jsx h */
/* @jsx h */
import { h } from 'preact';
import { Lex, ValueState, ValueStateValue, NumericEntryState, TransitionFactory } from '../src/lex';
import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
Expand Down
2 changes: 1 addition & 1 deletion demo/simple-number.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @jsx h */
/* @jsx h */
import { h } from 'preact';
import { Lex, ValueState, ValueStateValue, NumericEntryState } from '../src/lex';
import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
Expand Down
2 changes: 1 addition & 1 deletion demo/simple-string.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @jsx h */
/* @jsx h */
import { h } from 'preact';
import { Lex, ValueState, ValueStateValue, TextEntryState } from '../src/lex';
import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
Expand Down
2 changes: 1 addition & 1 deletion demo/token-actions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @jsx h */
/* @jsx h */
import { h } from 'preact';
import { Lex, ValueState, ValueStateValue, TextEntryState, Action, ActionButton } from '../src/lex';
import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
Expand Down
2 changes: 1 addition & 1 deletion demo/validated-multitype.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @jsx h */
/* @jsx h */
import { h } from 'preact';
import { Lex, TransitionFactory, ValueState, ValueStateValue, TextEntryState, NumericEntryState } from '../src/lex';
import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
Expand Down
Loading

0 comments on commit 178135b

Please sign in to comment.