mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-12-28 11:24:11 +08:00
feat(babel6): Fix syntax errors and add regenerator runtime
This commit is contained in:
parent
fb32bdfa67
commit
87b1d5075b
7 changed files with 28 additions and 20 deletions
|
@ -1,4 +1,4 @@
|
|||
export default categorizedEmojiList = {
|
||||
const categorizedEmojiList = {
|
||||
'People': [
|
||||
'grinning',
|
||||
'grimacing',
|
||||
|
@ -1308,3 +1308,4 @@ export default categorizedEmojiList = {
|
|||
'flag-zw'
|
||||
]
|
||||
}
|
||||
export default categorizedEmojiList
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import Reflux from 'reflux';
|
||||
|
||||
EmojiActions = Reflux.createActions([
|
||||
const EmojiActions = Reflux.createActions([
|
||||
"selectEmoji",
|
||||
"useEmoji"
|
||||
"useEmoji",
|
||||
]);
|
||||
|
||||
for (key in EmojiActions) {
|
||||
for (const key in EmojiActions) {
|
||||
EmojiActions[key].sync = true;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,18 +1,16 @@
|
|||
import {ComponentRegistry, WorkspaceStore} from 'nylas-exports'
|
||||
import SearchBar from './search-bar'
|
||||
|
||||
export default {
|
||||
configDefaults: {
|
||||
showOnRightSide: false,
|
||||
},
|
||||
|
||||
activate() {
|
||||
ComponentRegistry.register(SearchBar, {
|
||||
location: WorkspaceStore.Location.ThreadList.Toolbar,
|
||||
})
|
||||
},
|
||||
|
||||
deactivate() {
|
||||
ComponentRegistry.unregister(SearchBar)
|
||||
},
|
||||
export const configDefaults = {
|
||||
showOnRightSide: false,
|
||||
}
|
||||
|
||||
export function activate() {
|
||||
ComponentRegistry.register(SearchBar, {
|
||||
location: WorkspaceStore.Location.ThreadList.Toolbar,
|
||||
})
|
||||
}
|
||||
|
||||
export function deactivate() {
|
||||
ComponentRegistry.unregister(SearchBar)
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"babel-preset-es2015": "6.6.x",
|
||||
"babel-preset-react": "6.5.x",
|
||||
"babel-preset-stage-0": "6.5.x",
|
||||
"babel-regenerator-runtime": "6.5.x",
|
||||
"bluebird": "^2.9",
|
||||
"chrono-node": "^1.1.2",
|
||||
"classnames": "1.2.1",
|
||||
|
@ -71,6 +72,7 @@
|
|||
"semver": "^4.2",
|
||||
"source-map-support": "^0.3.2",
|
||||
"spellchecker": "3.2.3",
|
||||
"sqlite3": "https://github.com/bengotow/node-sqlite3/archive/bengotow/fts5.tar.gz",
|
||||
"temp": "^0.8",
|
||||
"underscore": "^1.8",
|
||||
"underscore.string": "^3.0",
|
||||
|
|
|
@ -9,6 +9,7 @@ var typescriptCompiler = require('./compile-support/typescript')
|
|||
var CSON = null
|
||||
|
||||
var COMPILERS = {
|
||||
'.js': babelCompiler,
|
||||
'.jsx': babelCompiler,
|
||||
'.es6': babelCompiler,
|
||||
'.ts': typescriptCompiler,
|
||||
|
|
|
@ -7,6 +7,11 @@ var defaultOptions = require('../../static/babelrc.json')
|
|||
var babel = null
|
||||
var babelVersionDirectory = null
|
||||
|
||||
// This adds in the regeneratorRuntime for generators to work properly
|
||||
// We manually insert it here instead of using the kitchen-sink
|
||||
// babel-polyfill.
|
||||
require('babel-regenerator-runtime');
|
||||
|
||||
exports.shouldCompile = function (sourceCode, filePath) {
|
||||
return (filePath.endsWith('.es6') || filePath.endsWith('.jsx'))
|
||||
}
|
||||
|
@ -28,7 +33,7 @@ exports.getCachePath = function (sourceCode) {
|
|||
|
||||
exports.compile = function (sourceCode, filePath) {
|
||||
if (!babel) {
|
||||
babel = require('babel-core')
|
||||
babel = require('babel-core');
|
||||
}
|
||||
|
||||
var options = {filename: filePath}
|
||||
|
|
Loading…
Reference in a new issue