Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
chore(release): release v0.4.0
Browse files Browse the repository at this point in the history
Merge pull request #386 from qri-io/v0_4_0
  • Loading branch information
b5 authored Sep 26, 2018
2 parents 09e8d8a + d57201b commit cf947e4
Show file tree
Hide file tree
Showing 13 changed files with 661 additions and 107 deletions.
13 changes: 12 additions & 1 deletion app/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div id="root"></div>
<script>
{
const scripts = [];
let scripts = [];

// Dynamically insert the DLL script in development env in the
// renderer process
Expand All @@ -43,6 +43,17 @@
: './dist/renderer.prod.js'
);

if (!process.env.HOT) {
// insert all required monaco scripts, this was hacked together by
// watching which files the app calls out to when monaco loads
scripts = scripts.concat([
'./dist/editor.worker.prod.js',
'./dist/36.prod.js',
'./dist/19.prod.js',
'./dist/56.prod.js'
])
}

document.write(
scripts
.map(script => '<script defer src="' + script + '"><\/script>')
Expand Down
500 changes: 475 additions & 25 deletions app/dist/renderer.prod.js

Large diffs are not rendered by default.

55 changes: 41 additions & 14 deletions app/dist/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "qri-webapp",
"productName": "qri",
"version": "0.3.0",
"version": "0.4.0",
"description": "qri (\"query\") frontend application",
"main": "./main.prod.js",
"author": {
Expand Down
1 change: 1 addition & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { AppContainer as ReactHotAppContainer } from 'react-hot-loader'
import Root from './containers/Root'
import configureStore from './store/configureStore'
import './app.global.scss'
import './monaco'

const store = configureStore()

Expand Down
23 changes: 23 additions & 0 deletions lib/monaco.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* globals __BUILD__, self */

// configure monaco environment
self.MonacoEnvironment = {
getWorkerUrl: function (moduleId, label) {
if (label === 'json') {
return './json.worker.bundle.js'
}
if (label === 'css') {
return './css.worker.bundle.js'
}
if (label === 'html') {
return './html.worker.bundle.js'
}
if (label === 'typescript' || label === 'javascript') {
return './ts.worker.bundle.js'
}
if (__BUILD__.MODE === 'production') {
return './editor.worker.prod.js'
}
return './editor.worker.bundle.js'
}
}
Binary file modified resources/qri
Binary file not shown.
1 change: 1 addition & 0 deletions version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default '0.4.0'
4 changes: 3 additions & 1 deletion webpack.config.renderer.dev.dll.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import baseConfig from './webpack.config.base'
import { dependencies } from './package.json'
import CheckNodeEnv from './internals/scripts/CheckNodeEnv'

import version from './version'

CheckNodeEnv('development')

const dist = path.resolve(process.cwd(), 'dll')
Expand Down Expand Up @@ -202,7 +204,7 @@ export default merge.smart(baseConfig, {
'API_URL': JSON.stringify('http://localhost:3000'),
'STATIC_ASSETS_URL': JSON.stringify('http://localhost:3000'),
'SEGMENT_KEY': JSON.stringify('not_a_key'),
'VERSION': JSON.stringify('0.4.0-dev')
'VERSION': JSON.stringify(version)
}
}),

Expand Down
84 changes: 49 additions & 35 deletions webpack.config.renderer.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { spawn, execSync } from 'child_process'
import ExtractTextPlugin from 'extract-text-webpack-plugin'
import baseConfig from './webpack.config.base'
import CheckNodeEnv from './internals/scripts/CheckNodeEnv'
import MonacoWebpackPlugin from 'monaco-editor-webpack-plugin'

CheckNodeEnv('development')

Expand All @@ -40,14 +41,21 @@ export default merge.smart(baseConfig, {
devtool: 'inline-source-map',
target: 'electron-renderer',

entry: [
'react-hot-loader/patch',
`webpack-dev-server/client?http://localhost:${port}/`,
'webpack/hot/only-dev-server',
path.join(__dirname, 'lib/index.js')
],
entry: {
'react-hot-loader/patch': 'react-hot-loader/patch',
'webpack-dev-server/client': `webpack-dev-server/client?http://localhost:${port}/`,
'webpack/hot/only-dev-server': 'webpack/hot/only-dev-server',
'lib/index.js': path.join(__dirname, 'lib/index.js'),

'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js',
'json.worker': 'monaco-editor/esm/vs/language/json/json.worker',
'css.worker': 'monaco-editor/esm/vs/language/css/css.worker',
'html.worker': 'monaco-editor/esm/vs/language/html/html.worker',
'ts.worker': 'monaco-editor/esm/vs/language/typescript/ts.worker'
},

output: {
globalObject: 'self',
publicPath: `http://localhost:${port}/dist/`
},

Expand All @@ -72,36 +80,40 @@ export default merge.smart(baseConfig, {
}
},
{
test: /\.global\.css$/,
use: [
{
loader: 'style-loader'
},
{
loader: 'css-loader',
options: {
sourceMap: true
}
}
]
},
{
test: /^((?!\.global).)*\.css$/,
use: [
{
loader: 'style-loader'
},
{
loader: 'css-loader',
options: {
modules: true,
sourceMap: true,
importLoaders: 1,
localIdentName: '[name]__[local]__[hash:base64:5]'
}
}
]
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
// {
// test: /\.global\.css$/,
// use: [
// {
// loader: 'style-loader'
// },
// {
// loader: 'css-loader',
// options: {
// sourceMap: true
// }
// }
// ]
// },
// {
// test: /^((?!\.global).)*\.css$/,
// use: [
// {
// loader: 'style-loader'
// },
// {
// loader: 'css-loader',
// options: {
// modules: true,
// sourceMap: true,
// importLoaders: 1,
// localIdentName: '[name]__[local]__[hash:base64:5]'
// }
// }
// ]
// },
// Add SASS support - compile all .global.scss files and pipe it to style.css
{
test: /\.global\.scss$/,
Expand Down Expand Up @@ -241,6 +253,8 @@ export default merge.smart(baseConfig, {
// multiStep: true
}),

new MonacoWebpackPlugin(),

new webpack.NoEmitOnErrorsPlugin(),

/**
Expand Down
Loading

0 comments on commit cf947e4

Please sign in to comment.