Stop using dist directory to build
This commit is contained in:
parent
8376ffe4cc
commit
ae1c079b95
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -3,7 +3,7 @@ Thumbs.db
|
||||||
*.log
|
*.log
|
||||||
|
|
||||||
node_modules/
|
node_modules/
|
||||||
dist/
|
*_bundle.js
|
||||||
release/
|
release/
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,7 @@
|
||||||
"build": "npm-run-all build:*",
|
"build": "npm-run-all build:*",
|
||||||
"build:main": "cross-env NODE_ENV=production webpack --bail --config webpack.config.main.js",
|
"build:main": "cross-env NODE_ENV=production webpack --bail --config webpack.config.main.js",
|
||||||
"build:renderer": "cross-env NODE_ENV=production webpack --bail --config webpack.config.renderer.js",
|
"build:renderer": "cross-env NODE_ENV=production webpack --bail --config webpack.config.renderer.js",
|
||||||
"build:others": "gulp build",
|
"start": "electron src",
|
||||||
"start": "electron dist",
|
|
||||||
"watch": "gulp watch",
|
"watch": "gulp watch",
|
||||||
"serve": "gulp watch",
|
"serve": "gulp watch",
|
||||||
"test": "npm-run-all build test:* lint:*",
|
"test": "npm-run-all build test:* lint:*",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const React = require('react');
|
const React = require('react');
|
||||||
const {findDOMNode} = require('react-dom');
|
const {findDOMNode} = require('react-dom');
|
||||||
const {ipcRenderer, shell} = require('electron');
|
const {ipcRenderer, remote, shell} = require('electron');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const url = require('url');
|
const url = require('url');
|
||||||
const osLocale = require('os-locale');
|
const osLocale = require('os-locale');
|
||||||
|
@ -8,6 +8,8 @@ const electronContextMenu = require('electron-context-menu');
|
||||||
|
|
||||||
const ErrorView = require('./ErrorView.jsx');
|
const ErrorView = require('./ErrorView.jsx');
|
||||||
|
|
||||||
|
const preloadJS = `file://${remote.app.getAppPath()}/browser/webview/mattermost_bundle.js`;
|
||||||
|
|
||||||
const MattermostView = React.createClass({
|
const MattermostView = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
disablewebsecurity: React.PropTypes.bool,
|
disablewebsecurity: React.PropTypes.bool,
|
||||||
|
@ -228,7 +230,7 @@ const MattermostView = React.createClass({
|
||||||
id={this.props.id}
|
id={this.props.id}
|
||||||
className='mattermostView'
|
className='mattermostView'
|
||||||
style={this.props.style}
|
style={this.props.style}
|
||||||
preload='webview/mattermost.js'
|
preload={preloadJS}
|
||||||
src={this.props.src}
|
src={this.props.src}
|
||||||
ref='webview'
|
ref='webview'
|
||||||
nodeintegration='false'
|
nodeintegration='false'
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel="stylesheet" href="modules/bootstrap/css/bootstrap.min.css">
|
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="css/index.css">
|
<link rel="stylesheet" href="css/index.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="content"></div>
|
<div id="content"></div>
|
||||||
<script src="index.js"></script>
|
<script src="index_bundle.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -4,14 +4,14 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Settings</title>
|
<title>Settings</title>
|
||||||
<link rel="stylesheet" href="modules/bootstrap/css/bootstrap.min.css">
|
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="css/index.css">
|
<link rel="stylesheet" href="css/index.css">
|
||||||
<link rel="stylesheet" href="css/settings.css">
|
<link rel="stylesheet" href="css/settings.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="content"></div>
|
<div id="content"></div>
|
||||||
<script src="settings.js"></script>
|
<script src="settings_bundle.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"desktopName": "Mattermost.desktop",
|
"desktopName": "Mattermost.desktop",
|
||||||
"version": "3.6.0",
|
"version": "3.6.0",
|
||||||
"description": "Mattermost",
|
"description": "Mattermost",
|
||||||
"main": "main.js",
|
"main": "main_bundle.js",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Yuya Ochiai",
|
"name": "Yuya Ochiai",
|
||||||
"email": "yuya0321@gmail.com"
|
"email": "yuya0321@gmail.com"
|
||||||
|
|
|
@ -6,7 +6,7 @@ const base = require('./webpack.config.base');
|
||||||
module.exports = merge(base, {
|
module.exports = merge(base, {
|
||||||
entry: './src/main.js',
|
entry: './src/main.js',
|
||||||
output: {
|
output: {
|
||||||
filename: './dist/main.js'
|
filename: './src/[name]_bundle.js'
|
||||||
},
|
},
|
||||||
node: {
|
node: {
|
||||||
__filename: false,
|
__filename: false,
|
||||||
|
|
|
@ -10,8 +10,8 @@ module.exports = merge(base, {
|
||||||
'webview/mattermost': './src/browser/webview/mattermost.js'
|
'webview/mattermost': './src/browser/webview/mattermost.js'
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
path: './dist/browser',
|
path: './src/browser',
|
||||||
filename: '[name].js'
|
filename: '[name]_bundle.js'
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [{
|
rules: [{
|
||||||
|
|
Loading…
Reference in a new issue