From bb737eeb3251ddefe413cbd62f23e9f9e9d74fdb Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 29 Aug 2018 17:37:20 -0400 Subject: [PATCH] success i think? --- config/rollup.js | 1 + config/webpack.js | 1 + file-that-is-not-called-rollup.js | 3 --- package.json | 2 +- rollup.config.js | 7 ++----- webpack.js | 3 +-- webpack/config.js | 3 +-- 7 files changed, 7 insertions(+), 13 deletions(-) create mode 100644 config/rollup.js create mode 100644 config/webpack.js delete mode 100644 file-that-is-not-called-rollup.js diff --git a/config/rollup.js b/config/rollup.js new file mode 100644 index 0000000..3b5c8be --- /dev/null +++ b/config/rollup.js @@ -0,0 +1 @@ +module.exports = require('../dist/rollup.js'); \ No newline at end of file diff --git a/config/webpack.js b/config/webpack.js new file mode 100644 index 0000000..15b21cf --- /dev/null +++ b/config/webpack.js @@ -0,0 +1 @@ +module.exports = require('../dist/webpack.js'); \ No newline at end of file diff --git a/file-that-is-not-called-rollup.js b/file-that-is-not-called-rollup.js deleted file mode 100644 index 6883e8d..0000000 --- a/file-that-is-not-called-rollup.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(`please tell me windows isn't trying to run this file`); - -module.exports = require('./dist/rollup.js'); \ No newline at end of file diff --git a/package.json b/package.json index 23425b7..24fee69 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "scripts": { "cy:open": "cypress open", "test": "mocha --opts mocha.opts", - "pretest": "npm run build && echo \"seriously, wtf\" && ls . && ls dist", + "pretest": "npm run build", "build": "rm -rf dist && rollup -c", "dev": "rollup -cw", "prepublishOnly": "npm test", diff --git a/rollup.config.js b/rollup.config.js index 1251460..c74d63d 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,4 +1,3 @@ -import path from 'path'; import typescript from 'rollup-plugin-typescript'; import string from 'rollup-plugin-string'; import json from 'rollup-plugin-json'; @@ -6,8 +5,6 @@ import resolve from 'rollup-plugin-node-resolve'; import commonjs from 'rollup-plugin-commonjs'; import pkg from './package.json'; -console.log('WE ARE INSIDE THE ROLLUP CONFIG'); - const external = [].concat( Object.keys(pkg.dependencies), Object.keys(process.binding('natives')), @@ -18,7 +15,7 @@ export default [ { input: `src/runtime/index.ts`, output: { - file: `./runtime.js`, + file: `runtime.js`, format: 'es' }, plugins: [ @@ -39,7 +36,7 @@ export default [ `src/webpack.ts` ], output: { - dir: './dist', + dir: 'dist', format: 'cjs', sourcemap: true }, diff --git a/webpack.js b/webpack.js index 8e67b99..98cf8c7 100644 --- a/webpack.js +++ b/webpack.js @@ -1,2 +1 @@ -// TODO write to this file, instead of webpack.js -module.exports = require('./dist/webpack.js'); \ No newline at end of file +throw new Error(`As of Sapper 0.18, webpack config must be loaded from sapper/config/webpack.js`); \ No newline at end of file diff --git a/webpack/config.js b/webpack/config.js index 83dcd37..98cf8c7 100644 --- a/webpack/config.js +++ b/webpack/config.js @@ -1,2 +1 @@ -// TODO deprecate this file in favour of sapper/webpack.js -module.exports = require('../dist/webpack.js'); \ No newline at end of file +throw new Error(`As of Sapper 0.18, webpack config must be loaded from sapper/config/webpack.js`); \ No newline at end of file