mirror of
				https://github.com/valentineus/iii-client.git
				synced 2025-11-04 03:49:44 +03:00 
			
		
		
		
	Switch to the rollup assembly system
This commit is contained in:
		
							
								
								
									
										13
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								package.json
									
									
									
									
									
								
							@@ -26,18 +26,21 @@
 | 
				
			|||||||
    "devDependencies": {
 | 
					    "devDependencies": {
 | 
				
			||||||
        "babel-cli": "^6.24.1",
 | 
					        "babel-cli": "^6.24.1",
 | 
				
			||||||
        "babel-core": "^6.24.1",
 | 
					        "babel-core": "^6.24.1",
 | 
				
			||||||
        "babel-loader": "^7.1.2",
 | 
					 | 
				
			||||||
        "babel-preset-es2015": "^6.24.1",
 | 
					        "babel-preset-es2015": "^6.24.1",
 | 
				
			||||||
 | 
					        "babel-preset-es2015-rollup": "^3.0.0",
 | 
				
			||||||
        "eslint": "^3.19.0",
 | 
					        "eslint": "^3.19.0",
 | 
				
			||||||
        "uglify-js": "^3.1.2",
 | 
					        "rollup": "^0.50.0",
 | 
				
			||||||
        "webpack": "^3.6.0"
 | 
					        "rollup-plugin-babel": "^3.0.2",
 | 
				
			||||||
 | 
					        "rollup-plugin-node-builtins": "^2.1.2",
 | 
				
			||||||
 | 
					        "rollup-plugin-node-globals": "^1.1.0",
 | 
				
			||||||
 | 
					        "uglify-js": "^3.1.2"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "scripts": {
 | 
					    "scripts": {
 | 
				
			||||||
        "minify-standalone": "uglifyjs --mangle --compress --toplevel --source-map --output dist/standalone.min.js dist/standalone.js",
 | 
					        "minify-standalone": "uglifyjs --mangle --compress --toplevel --source-map --output dist/standalone.min.js dist/standalone.js",
 | 
				
			||||||
        "minify-browser": "uglifyjs --mangle --compress --toplevel --source-map --output dist/bundle.min.js dist/bundle.js",
 | 
					        "minify-browser": "uglifyjs --mangle --compress --toplevel --source-map --output dist/bundle.min.js dist/bundle.js",
 | 
				
			||||||
        "minify": "npm run minify-browser && npm run minify-standalone",
 | 
					        "minify": "npm run minify-browser && npm run minify-standalone",
 | 
				
			||||||
        "build-standalone": "babel --out-file dist/standalone.js src/index.js",
 | 
					        "build-standalone": "babel src/index.js --out-file dist/standalone.js",
 | 
				
			||||||
        "build-browser": "webpack --config webpack.config.js",
 | 
					        "build-browser": "rollup --config rollup.config.js",
 | 
				
			||||||
        "build": "npm run build-browser && npm run build-standalone",
 | 
					        "build": "npm run build-browser && npm run build-standalone",
 | 
				
			||||||
        "check": "eslint ./src/*"
 | 
					        "check": "eslint ./src/*"
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										22
									
								
								rollup.config.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								rollup.config.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
				
			|||||||
 | 
					import builtins from 'rollup-plugin-node-builtins';
 | 
				
			||||||
 | 
					import globals from 'rollup-plugin-node-globals';
 | 
				
			||||||
 | 
					import babel from 'rollup-plugin-babel';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					    moduleName: 'client',
 | 
				
			||||||
 | 
					    dest: 'dist/bundle.js',
 | 
				
			||||||
 | 
					    entry: 'src/index.js',
 | 
				
			||||||
 | 
					    format: 'iife',
 | 
				
			||||||
 | 
					    plugins: [
 | 
				
			||||||
 | 
					        builtins(),
 | 
				
			||||||
 | 
					        globals(),
 | 
				
			||||||
 | 
					        babel({
 | 
				
			||||||
 | 
					            babelrc: false,
 | 
				
			||||||
 | 
					            sourceMaps: false,
 | 
				
			||||||
 | 
					            comments: false,
 | 
				
			||||||
 | 
					            presets: [
 | 
				
			||||||
 | 
					                ["es2015", { modules: false }]
 | 
				
			||||||
 | 
					            ],
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
@@ -1,25 +0,0 @@
 | 
				
			|||||||
'use strict';
 | 
					 | 
				
			||||||
var webpack = require('webpack');
 | 
					 | 
				
			||||||
var path = require('path');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
module.exports = {
 | 
					 | 
				
			||||||
    entry: path.resolve(__dirname, 'src/index.js'),
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    output: {
 | 
					 | 
				
			||||||
        filename: 'bundle.js',
 | 
					 | 
				
			||||||
        path: path.resolve(__dirname, 'dist')
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    module: {
 | 
					 | 
				
			||||||
        rules: [{
 | 
					 | 
				
			||||||
            test: /\.js$/,
 | 
					 | 
				
			||||||
            exclude: /(node_modules|bower_components)/,
 | 
					 | 
				
			||||||
            use: {
 | 
					 | 
				
			||||||
                loader: 'babel-loader',
 | 
					 | 
				
			||||||
                options: {
 | 
					 | 
				
			||||||
                    presets: ['es2015']
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }]
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user