Skip to content

Commit

Permalink
fix(nerv-build): fix error during installing nerv-build on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
littly committed Mar 15, 2018
1 parent 386f07a commit 6f9caf6
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 3 deletions.
5 changes: 5 additions & 0 deletions packages/nerv-create-class/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ const alias = require('rollup-plugin-alias')
const { join } = require('path')
const cwd = __dirname

function resolver (path) {
return join(__dirname, path)
}

const optJSPlugin = {
name: 'optimizeJs',
transformBundle (code) {
Expand Down Expand Up @@ -63,6 +67,7 @@ const baseConfig = {
}),
resolve(),
typescript({
tsconfig: resolver('../../tsconfig.json'),
typescript: require('typescript')
}),
buble(),
Expand Down
1 change: 1 addition & 0 deletions packages/nerv-devtools/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports = {
'nerv-utils': join(cwd, '../nerv-utils/dist/index')
}),
typescript({
tsconfig: resolver('../../tsconfig.json'),
typescript: require('typescript')
})
]
Expand Down
7 changes: 6 additions & 1 deletion packages/nerv-server/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@ const pkg = require('./package.json')
const alias = require('rollup-plugin-alias')
const { join } = require('path')
const cwd = __dirname
function resolver (path) {
return join(__dirname, path)
}
module.exports = {
input: 'src/index.ts',
plugins: [
alias({
'nerv-shared': join(cwd, '../nerv-shared/dist/index'),
'nerv-utils': join(cwd, '../nerv-utils/dist/index')
}),
typescript()
typescript({
tsconfig: resolver('../../tsconfig.json')
})
],
output: [
{
Expand Down
1 change: 1 addition & 0 deletions packages/nerv-shared/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module.exports = {
},
plugins: [
typescript({
tsconfig: resolver('../../tsconfig.json'),
typescript: require('typescript')
})
]
Expand Down
1 change: 1 addition & 0 deletions packages/nerv-test-utils/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
'nerv-utils': join(cwd, '../nerv-utils/dist/index')
}),
typescript({
tsconfig: resolver('../../tsconfig.json'),
typescript: require('typescript')
})
]
Expand Down
3 changes: 1 addition & 2 deletions packages/nerv-test-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import {
isComponent
} from 'nerv-shared'
import { isString, isArray } from 'nerv-utils'
// tslint:disable-next-line:no-var-requires
const simulateEvents = require('simulate-event')
import simulateEvents from 'simulate-event'

function renderIntoDocument (instance) {
const dom = document.createElement('div')
Expand Down
1 change: 1 addition & 0 deletions packages/nerv-utils/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = {
external: ['nerv-shared'],
plugins: [
typescript({
tsconfig: resolver('../../tsconfig.json'),
typescript: require('typescript')
})
]
Expand Down
5 changes: 5 additions & 0 deletions packages/nerv/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ const alias = require('rollup-plugin-alias')
const { join } = require('path')
const cwd = __dirname

function resolver (path) {
return join(__dirname, path)
}

const optJSPlugin = {
name: 'optimizeJs',
transformBundle (code) {
Expand Down Expand Up @@ -62,6 +66,7 @@ const baseConfig = {
}),
resolve(),
typescript({
tsconfig: resolver('../../tsconfig.json'),
typescript: require('typescript')
}),
buble(),
Expand Down

0 comments on commit 6f9caf6

Please sign in to comment.