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

Commit

Permalink
chore(release): release version 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
b5 committed Sep 26, 2018
1 parent 37e0136 commit d57201b
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 40 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
12 changes: 6 additions & 6 deletions app/dist/renderer.prod.js

Large diffs are not rendered by default.

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
25 changes: 2 additions & 23 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/* globals __BUILD__, self */
/* globals __BUILD__ */
import React from 'react'
import { render } from 'react-dom'
import { AppContainer as ReactHotAppContainer } from 'react-hot-loader'
import Root from './containers/Root'
import configureStore from './store/configureStore'
import './app.global.scss'

import * as monaco from 'monaco-editor'
import './monaco'

const store = configureStore()

Expand Down Expand Up @@ -50,23 +49,3 @@ if (__BUILD__.MODE === 'production') {
load () {}
}
}

console.log(self)

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';
}
return './editor.worker.bundle.js';
}
}
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'
}
}
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
14 changes: 8 additions & 6 deletions webpack.config.renderer.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
import path from 'path'
import webpack from 'webpack'
import ExtractTextPlugin from 'extract-text-webpack-plugin'
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'
// import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'
import merge from 'webpack-merge'
import MinifyPlugin from 'babel-minify-webpack-plugin'
import baseConfig from './webpack.config.base'
import CheckNodeEnv from './internals/scripts/CheckNodeEnv'
import MonacoWebpackPlugin from 'monaco-editor-webpack-plugin'

import version from './version'

CheckNodeEnv('production')

export default merge.smart(baseConfig, {
Expand Down Expand Up @@ -173,22 +175,22 @@ export default merge.smart(baseConfig, {
'API_URL': JSON.stringify('http://localhost:2503'),
'STATIC_ASSETS_URL': JSON.stringify('http://localhost:2503'),
'ELECTRON': JSON.stringify('true'),
'VERSION': JSON.stringify('0.3.0'),
'VERSION': JSON.stringify(version),

'SEGMENT_KEY': JSON.stringify('--nope--')
}
}),

new MonacoWebpackPlugin(),

// new MinifyPlugin({}, {
// sourceMap: null
// }),
new MinifyPlugin({}, {
sourceMap: null
}),

// https://github.com/bitinn/node-fetch/issues/41
// new webpack.IgnorePlugin(/\/iconv-loader$/),

new ExtractTextPlugin('style.css'),
new ExtractTextPlugin('style.css')

// new BundleAnalyzerPlugin({
// analyzerMode: process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
Expand Down
4 changes: 3 additions & 1 deletion webpack.config.webapp.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import baseConfig from './webpack.config.base'
import CheckNodeEnv from './internals/scripts/CheckNodeEnv'
import MonacoWebpackPlugin from 'monaco-editor-webpack-plugin'

import version from './version'

CheckNodeEnv('development')

const port = process.env.PORT || 2505
Expand Down Expand Up @@ -68,7 +70,7 @@ export default merge.smart(baseConfig, {
'API_URL': JSON.stringify('http://localhost:2503'),
'STATIC_ASSETS_URL': JSON.stringify('http://localhost:2503'),
'SEGMENT_KEY': JSON.stringify('not_a_key'),
'VERSION': JSON.stringify('0.3.0')
'VERSION': JSON.stringify(version)
}
})
],
Expand Down
4 changes: 3 additions & 1 deletion webpack.config.webapp.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import baseConfig from './webpack.config.base'
import CheckNodeEnv from './internals/scripts/CheckNodeEnv'
import MinifyPlugin from 'babel-minify-webpack-plugin'

import version from './version'

CheckNodeEnv('production')

export default merge.smart(baseConfig, {
Expand All @@ -33,7 +35,7 @@ export default merge.smart(baseConfig, {
'API_URL': JSON.stringify('http://localhost:2503'),
'STATIC_ASSETS_URL': JSON.stringify('http://localhost:2503'),
'SEGMENT_KEY': JSON.stringify('not_a_key'),
'VERSION': JSON.stringify('0.3.0')
'VERSION': JSON.stringify(version)
}
})
],
Expand Down

0 comments on commit d57201b

Please sign in to comment.