New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

weexpack-create

Package Overview
Dependencies
Maintainers
5
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weexpack-create - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

templates/.babelrc

2

package.json
{
"name": "weexpack-create",
"version": "0.1.8",
"version": "0.1.9",
"description": "weexpack create module. Creates new project from default or template",

@@ -5,0 +5,0 @@ "main": "index.js",

{
"name": "xxx",
"name": "weex",
"version": "1.0.0",

@@ -7,6 +7,7 @@ "description": "a weex project",

"scripts": {
"start": "npm run serve",
"build": "webpack",
"build_plugin": "webpack --config ./tools/webpack.config.plugin.js --color",
"dev": "weex-builder src dist -w",
"serve": "webpack-dev-server --config webpack.dev.js -p --open"
"dev": "webpack --config webpack.config.js --watch",
"serve": "webpack-dev-server --config webpack.dev.js --progress --watch --open"
},

@@ -19,2 +20,3 @@ "keywords": [

"dependencies": {
"fs-extra": "^4.0.1",
"vue": "^2.1.8",

@@ -35,3 +37,6 @@ "vue-router": "^2.1.1",

"css-loader": "^0.26.1",
"quick-local-ip": "^1.0.7",
"html-webpack-plugin": "^2.30.1",
"ip": "^1.1.5",
"raw-loader": "^0.5.1",
"script-ext-html-webpack-plugin": "^1.8.5",
"vue-loader": "^10.0.2",

@@ -41,2 +46,3 @@ "vue-template-compiler": "^2.1.8",

"webpack-dev-server": "^2.4.2",
"webpack-merge": "^4.1.0",
"weex-builder": "^0.2.6",

@@ -43,0 +49,0 @@ "weex-loader": "^0.4.1"

const configs = require('./webpack.config.js');
const webpack = require('webpack');
const ip = require('quick-local-ip').getLocalIP4();
const pathTo = require('path');
const webpackMerge = require('webpack-merge'); // used to merge webpack configs
// tools
const ip = require('ip').address();
const path = require('path');
const chalk = require('chalk');
let config = Array.isArray(configs) ? configs[0] : configs;
config.devServer = {
contentBase: pathTo.join(__dirname, ''),
compress: true,
// hot: true,
host: '0.0.0.0',
public: ip + ':8080/web',
// publicPath: '/dist/',
};
// configs.plugins.push(new webpack.HotModuleReplacementPlugin());
console.log('server is running! Please open ' + chalk.green('http://' + ip + ':8080/web/index.html'));
module.exports = config;
/**
* Webpack Plugins
*/
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin');
/**
* Webpack configuration
*/
module.exports = function() {
return webpackMerge(config, {
/**
* Developer tool to enhance debugging
*
* See: http://webpack.github.io/docs/configuration.html#devtool
* See: https://github.com/webpack/docs/wiki/build-performance#sourcemaps
*/
devtool: 'cheap-module-source-map',
/*
* Options affecting the resolving of modules.
*
* See: http://webpack.github.io/docs/configuration.html#resolve
*/
module: {
rules: [
// support for .html antd .css as raw text
{
test: /\.html$/,
loader: 'raw-loader',
},
]
},
plugins: [
/*
* Plugin: HtmlWebpackPlugin
* Description: Simplifies creation of HTML files to serve your webpack bundles.
* This is especially useful for webpack bundles that include a hash in the filename
* which changes every compilation.
*
* See: https://github.com/ampedandwired/html-webpack-plugin
*/
new HtmlWebpackPlugin({
template: 'web/index.dev.html',
title: 'Hello Weex',
isDevServer: true,
chunksSortMode: 'dependency',
inject: 'head'
}),
/*
* Plugin: ScriptExtHtmlWebpackPlugin
* Description: Enhances html-webpack-plugin functionality
* with different deployment options for your scripts including:
*
* See: https://github.com/numical/script-ext-html-webpack-plugin
*/
new ScriptExtHtmlWebpackPlugin({
defaultAttribute: 'defer'
})
],
/**
* Webpack Development Server configuration
* Description: The webpack-dev-server is a little node.js Express server.
* The server emits information about the compilation state to the client,
* which reacts to those events.
*
* See: https://webpack.github.io/docs/webpack-dev-server.html
*/
devServer: {
compress: true,
host: '0.0.0.0',
port: '8080',
historyApiFallback: true,
public: ip + ':8080',
watchOptions: {
aggregateTimeout: 300,
poll: 1000
}
}
});
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc