Skip to content

Commit

Permalink
Simplify popup build
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-f committed Sep 1, 2017
1 parent c516dc6 commit c481e50
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 102 deletions.
3 changes: 1 addition & 2 deletions .env.demo.example
@@ -1,2 +1 @@
IDP_SELECT_URI=http://localhost:8081/popup.html
CALLBACK_URI=http://localhost:8081/popup.html
POPUP_URI=http://localhost:8081/popup.html
21 changes: 10 additions & 11 deletions package.json
Expand Up @@ -3,18 +3,18 @@
"version": "0.4.0",
"description": "Opaquely authenticates solid clients",
"main": "lib/index.js",
"files": [
"lib",
"dist-lib"
],
"files": ["lib", "dist-lib"],
"repository": "git@github.com:solid/solid-auth-client.git",
"author": "Daniel Friedman <dfriedman58@gmail.com>",
"license": "MIT",
"scripts": {
"start:demo": "webpack-dev-server --env development --config=./webpack/webpack.demo.config.js",
"start:popup": "webpack-dev-server --env development --config=./webpack/webpack.popup.config.js",
"start:demo":
"webpack-dev-server --env development --config=./webpack/webpack.demo.config.js",
"start:popup":
"webpack-dev-server --env development --config=./webpack/webpack.popup.config.js",
"jest": "jest src --coverage",
"format": "prettier --parser flow --no-semi --single-quote --write '{src,demo,popup-app}/**/*.js'",
"format":
"prettier --parser flow --no-semi --single-quote --write '{src,demo,popup-app}/**/*.js'",
"prelint": "yarn format",
"lint": "eslint '{src,demo,popup-app}/**/*.js'",
"pretest": "flow && yarn lint",
Expand All @@ -26,7 +26,8 @@
"build:lib": "rm -rf lib && babel --ignore '**.spec.js' src -d lib",
"build:lib:umd": "webpack --config=./webpack/webpack.lib.config.js -p",
"build:demo": "webpack --config=./webpack/webpack.demo.config.js -p",
"build:popup": "webpack --config=./webpack/webpack.popup.config.js -p",
"build:popup":
"webpack --config=./webpack/webpack.popup.config.js -p && rm ./dist-popup/popup.bundle.js",
"preversion": "yarn test",
"postversion": "git push --follow-tags",
"prepublishOnly": "yarn build"
Expand Down Expand Up @@ -84,7 +85,5 @@
"jest": {
"testURL": "https://app.biz/page?foo=bar#more-params"
},
"pre-commit": [
"test"
]
"pre-commit": ["test"]
}
45 changes: 0 additions & 45 deletions webpack.config.demo.js

This file was deleted.

35 changes: 0 additions & 35 deletions webpack.config.js

This file was deleted.

11 changes: 2 additions & 9 deletions webpack/webpack.popup.config.js
Expand Up @@ -3,13 +3,8 @@ const DotenvPlugin = require('dotenv-webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin')
const path = require('path')
const webpack = require('webpack')

const {
module: _module,
externals,
devtool
} = require('./webpack.common.config')
const { module: _module, externals } = require('./webpack.common.config')

const outputDir = './dist-popup'

Expand Down Expand Up @@ -42,10 +37,8 @@ module.exports = {
filename: 'popup.html',
inlineSource: '.(js|css)$'
}),
new HtmlWebpackInlineSourcePlugin(),
new webpack.HotModuleReplacementPlugin(outputDir)
new HtmlWebpackInlineSourcePlugin()
],
devtool,
devServer: {
contentBase: path.join(__dirname, 'dist')
}
Expand Down

0 comments on commit c481e50

Please sign in to comment.