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