mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Build環境設定
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { Provider } from 'react-redux'
|
import { Provider } from 'react-redux'
|
||||||
// import { updateUser } from 'boost/actions'
|
// import { updateUser } from 'boost/actions'
|
||||||
import { Router, Route, IndexRoute } from 'react-router'
|
import { Router, Route, IndexRoute } from 'react-router'
|
||||||
@@ -6,6 +5,7 @@ import MainPage from './MainPage'
|
|||||||
import HomePage from './HomePage'
|
import HomePage from './HomePage'
|
||||||
// import auth from 'boost/auth'
|
// import auth from 'boost/auth'
|
||||||
import store from 'boost/store'
|
import store from 'boost/store'
|
||||||
|
import React from 'react'
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom'
|
||||||
require('../styles/main/index.styl')
|
require('../styles/main/index.styl')
|
||||||
import { openModal } from 'boost/modal'
|
import { openModal } from 'boost/modal'
|
||||||
|
|||||||
1
node_modules/boost
generated
vendored
1
node_modules/boost
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../lib
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
"description": "Boost App",
|
"description": "Boost App",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "BOOST_ENV=development electron ./main.js",
|
"start": "set BOOST_ENV=development&& electron ./main.js",
|
||||||
"webpack": "webpack-dev-server --hot --inline --config webpack.config.js",
|
"webpack": "webpack-dev-server --hot --inline --config webpack.config.js",
|
||||||
"compile": "NODE_ENV=production webpack --config webpack.config.production.js",
|
"compile": "NODE_ENV=production webpack --config webpack.config.production.js",
|
||||||
"build": "electron-packager ./ Boost --app-version=$npm_package_version $npm_package_config_platform $npm_package_config_version $npm_package_config_ignore --overwrite",
|
"build": "electron-packager ./ Boost --app-version=$npm_package_version $npm_package_config_platform $npm_package_config_version $npm_package_config_ignore --overwrite",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ var JsonpTemplatePlugin = webpack.JsonpTemplatePlugin
|
|||||||
var FunctionModulePlugin = require('webpack/lib/FunctionModulePlugin')
|
var FunctionModulePlugin = require('webpack/lib/FunctionModulePlugin')
|
||||||
var NodeTargetPlugin = require('webpack/lib/node/NodeTargetPlugin')
|
var NodeTargetPlugin = require('webpack/lib/node/NodeTargetPlugin')
|
||||||
var ExternalsPlugin = webpack.ExternalsPlugin
|
var ExternalsPlugin = webpack.ExternalsPlugin
|
||||||
|
|
||||||
var opt = {
|
var opt = {
|
||||||
path: path.join(__dirname, 'compiled'),
|
path: path.join(__dirname, 'compiled'),
|
||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
@@ -11,6 +12,7 @@ var opt = {
|
|||||||
libraryTarget: 'commonjs2',
|
libraryTarget: 'commonjs2',
|
||||||
publicPath: 'http://localhost:8080/assets/'
|
publicPath: 'http://localhost:8080/assets/'
|
||||||
}
|
}
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
module: {
|
module: {
|
||||||
loaders: [
|
loaders: [
|
||||||
@@ -35,7 +37,10 @@ var config = {
|
|||||||
output: opt,
|
output: opt,
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['', '.js', '.jsx'],
|
extensions: ['', '.js', '.jsx'],
|
||||||
packageMains: ['webpack', 'browser', 'web', 'browserify', ['jam', 'main'], 'main']
|
packageMains: ['webpack', 'browser', 'web', 'browserify', ['jam', 'main'], 'main'],
|
||||||
|
alias: {
|
||||||
|
'boost': path.resolve(__dirname, 'lib')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack.NoErrorsPlugin(),
|
new webpack.NoErrorsPlugin(),
|
||||||
|
|||||||
Reference in New Issue
Block a user