Skip to content

Commit

Permalink
use packages under @babel scope
Browse files Browse the repository at this point in the history
  • Loading branch information
KagamiChan committed Feb 19, 2018
1 parent d13788d commit 730aa1c
Show file tree
Hide file tree
Showing 10 changed files with 1,794 additions and 1,764 deletions.
2 changes: 1 addition & 1 deletion assets/js/plugin-preload.js
Expand Up @@ -5,7 +5,7 @@ const APPDATA_PATH = remote.getGlobal('APPDATA_PATH')
const config = remote.require('./lib/config')

require('module').globalPaths.push(MODULE_PATH)
require('babel-register')(require(`${ROOT}/babel.config`))
require('@babel/register')(require(`${ROOT}/babel.config`))
require('coffee-react/register')
async function setPath() {
require(`${ROOT}/lib/module-path`).setAllowedPath([ ROOT, APPDATA_PATH, await remote.getCurrentWebContents().executeJavaScript('__dirname') ])
Expand Down
6 changes: 3 additions & 3 deletions babel.config.js
@@ -1,16 +1,16 @@
module.exports = {
presets: [
[
"env",
"@babel/preset-env",
{
targets: {
electron: "1.8",
},
loose: true,
},
],
"stage-0",
"react",
"@babel/preset-stage-0",
"@babel/preset-react",
],
plugins: [
"transform-export-extensions",
Expand Down
2 changes: 1 addition & 1 deletion build/compile-to-js.es
Expand Up @@ -2,7 +2,7 @@ import fs from 'fs-extra'
import path from 'path-extra'
import Promise, { promisify } from 'bluebird'
import { log } from '../lib/utils'
import { transformFile } from 'babel-core'
import { transformFile } from '@babel/core'
import BabelConfig from '../babel.config'
import walk from 'walk'

Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
@@ -1,4 +1,4 @@
require('babel-register')(require('./babel.config'))
require('@babel/register')(require('./babel.config'))
const gulp = require('gulp')
const path = require('path')

Expand Down
2 changes: 1 addition & 1 deletion index.html
Expand Up @@ -8,7 +8,7 @@
<script>
window.isMain = true
require('coffee-script/register');
require('babel-register')(require('./babel.config'));
require('@babel/register')(require('./babel.config'));
require('./views/env');
</script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion index.js
@@ -1,4 +1,4 @@
require('coffee-script/register')
require('babel-register')(require('./babel.config'))
require('@babel/register')(require('./babel.config'))
require('./lib/cli')
require('./app')

0 comments on commit 730aa1c

Please sign in to comment.