amotify 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,14 +1,19 @@
1
1
  {
2
2
  "name": "amotify",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "UI FW for React",
5
5
  "main": "dist/amotify.min.js",
6
6
  "types": "dist/amotify.d.ts",
7
7
  "scripts": {
8
8
  "clean": "rimraf dist",
9
+ "devCDN:webpack": "webpack --mode development --watch",
10
+ "devCDN:server": "nodemon app.js",
11
+ "proCDN:webpack": "webpack --mode production",
12
+ "build": "run-p clean proCDN:*",
9
13
 
10
- "start": "run-p build:*",
11
- "build:clean": "rimraf dist",
14
+ "start": "run-p clean build:*",
15
+
16
+ "_start:webpack": "webpack --mode development --watch",
12
17
 
13
18
  "build:component": "npx ts-node bundler.ts",
14
19
  "build:component_watch": "nodemon --watch src --ext tsx --ext scss --exec \"npx ts-node bundler.ts\"",
package/webpack.config.js DELETED
@@ -1,148 +0,0 @@
1
- module.exports = ( () => {
2
- let path = require( 'path' )
3
- let MinCss = require( 'mini-css-extract-plugin' )
4
- let RemoveWasteFiles = require( 'webpack-remove-empty-scripts' )
5
- let webpack = require( 'webpack' )
6
- let TerserPlugin = require( 'terser-webpack-plugin' )
7
- let BundleAnalyzerPlugin = require( 'webpack-bundle-analyzer' ).BundleAnalyzerPlugin
8
- let BrowserSync = require( 'browser-sync-webpack-plugin' )
9
- let BrowserSync_option = {
10
- host: 'localhost',
11
- // port: 10201,
12
- // proxy: 'http://localhost:10300/',
13
- port: 10201,
14
- proxy: 'http://localhost:10200/',
15
- open: false,
16
- notify: false
17
- }
18
- let project = {
19
- name: 'amotify',
20
- ver: 'v0.0.53',
21
- author: 'mingoo LLC.',
22
- details: 'https://mingoo.co.jp/'
23
- }
24
-
25
- return {
26
- mode: 'development',
27
- entry: {
28
- 'amotify': './src/amotify.tsx'
29
- },
30
- output: {
31
- library: 'amotify',
32
- libraryTarget: 'umd',
33
- libraryExport: 'default',
34
- path: __dirname + '/dist/',
35
- filename: '[name].js',
36
- devtoolModuleFilenameTemplate: 'src/[resource-path]'
37
- },
38
- optimization: {
39
- minimize: true,
40
- minimizer: [
41
- new TerserPlugin( {
42
- parallel: true,
43
- extractComments: false,
44
- terserOptions: {
45
- compress: {
46
- drop_console: true
47
- },
48
- output: {
49
- comments: /^\*?!/
50
- }
51
- }
52
- } )
53
- ],
54
- splitChunks: {
55
- cacheGroups: {
56
- vendor: {
57
- test: /node_modules/,
58
- filename: 'coreVender.js',
59
- chunks: 'all',
60
- enforce: true
61
- }
62
- }
63
- }
64
- },
65
- externals: {
66
- // 'react': 'React',
67
- // 'react-dom': 'ReactDOM',
68
- // 'react-router-dom': 'ReactRouterDOM'
69
- },
70
- module: {
71
- rules: [
72
- {
73
- test: /\.scss/,
74
- use: [
75
- MinCss.loader,
76
- 'css-loader',
77
- 'sass-loader'
78
- ]
79
- },
80
- {
81
- test: /\.(j|t)sx?$/,
82
- use: [
83
- {
84
- loader: 'babel-loader',
85
- options: {
86
- presets: [
87
- '@babel/preset-env',
88
- '@babel/preset-react',
89
- '@babel/preset-typescript'
90
- ]
91
- }
92
- },
93
- {
94
- loader: "ts-loader",
95
- options: {
96
- // allowTsInNodeModules: true,
97
- // transpileOnly:true,
98
- configFile: path.resolve( __dirname, 'tsconfig.json' )
99
- }
100
- }
101
- ],
102
- }
103
- ]
104
- },
105
- resolve: {
106
- modules: [ 'node_modules' ],
107
- extensions: [ '.js', '.jsx', '.tsx', '.ts' ],
108
- alias: {
109
- '~': `${ __dirname }/src`,
110
-
111
- '@props': path.resolve( __dirname, 'src/@styles/props.scss' ),
112
- '@mixin': path.resolve( __dirname, 'src/@styles/mixin.scss' ),
113
-
114
- '@declaration': path.resolve( __dirname, 'src/@declaration/_' ),
115
-
116
- '@global': path.resolve( __dirname, 'src/@global' ),
117
- '@atoms': path.resolve( __dirname, 'src/@atoms' ),
118
- '@mols': path.resolve( __dirname, 'src/@molecules' ),
119
- '@orgs': path.resolve( __dirname, 'src/@organisms' ),
120
- '@temps': path.resolve( __dirname, 'src/@templates' ),
121
- '@fn': path.resolve( __dirname, 'src/@functions' ),
122
- }
123
- },
124
- plugins: [
125
- // new BundleAnalyzerPlugin(),
126
- // new BrowserSync(
127
- // BrowserSync_option,
128
- // { reload: true }
129
- // ),
130
- new MinCss( {
131
- filename: '[name].min.css'
132
- } ),
133
- new RemoveWasteFiles,
134
- new webpack.BannerPlugin( {
135
- banner: `
136
- ${ project.name } JavaScript Library ${ project.ver }
137
- ${ project.details }
138
-
139
- Copyright ${ project.author }
140
- Released under the MIT license
141
- ${ project.details }license
142
-
143
- Last updated: ${ new Date().toLocaleDateString() }
144
- `
145
- } )
146
- ],
147
- }
148
- } )()