Skip to content

Commit

Permalink
Update webpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
omgftw committed Aug 11, 2017
1 parent f6b4fa3 commit 73fd29a
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 23 deletions.
9 changes: 0 additions & 9 deletions extension-scripts.ts

This file was deleted.

2 changes: 1 addition & 1 deletion manifest.json
Expand Up @@ -19,7 +19,7 @@
},

"background": {
"scripts": ["scripts/extension.js"]
"scripts": ["scripts/background.js"]
},

"options_ui": {
Expand Down
9 changes: 9 additions & 0 deletions src/main/background.ts
@@ -0,0 +1,9 @@
import { Step } from "../step";
import { By } from "../by";
import { VERSION } from "../selenium-ide";
import { ActionHandler } from '../extension/action-handler';
import { MessageHandler } from "../extension/message-handler";

console.log(VERSION);
console.log('Extension Scripts loaded...');
let messageHandler = new MessageHandler();
2 changes: 1 addition & 1 deletion content-scripts.ts → src/main/content.ts
@@ -1,4 +1,4 @@
import { ActionRecorder } from "./src/content/action-recorder";
import { ActionRecorder } from "../content/action-recorder";

console.log('Content Scripts loaded...');
let actionRecorder = new ActionRecorder();
Empty file added src/main/extension.ts
Empty file.
27 changes: 15 additions & 12 deletions webpack.config.js
Expand Up @@ -17,14 +17,16 @@ var babelOptions = {
module.exports = {
cache: true,
entry: {
extension: './extension-scripts.ts',
//TODO: Separate this to prevent loading within the extension itself
content: './content-scripts.ts',
vendor: [
'./vendor/superhero/superhero.min.css'
// 'babel-polyfill',
extension: [
'./src/main/extension.ts',
'./vendor/superhero/superhero.min.css',
'./src/sass/main.sass'
],
styles: './src/sass/main.sass'
content: './src/main/content.ts',
background: './src/main/background.ts',
// vendor: [
// // 'babel-polyfill',
// ],
},
output: {
path: path.resolve(__dirname, './dist'),
Expand Down Expand Up @@ -95,20 +97,21 @@ module.exports = {
{ from: './images/selenium-ide-logo-48.png', to: './assets/images/selenium-ide-logo-48.png' },
{ from: './images/selenium-ide-logo-128.png', to: './assets/images/selenium-ide-logo-128.png' },
{ from: './images/selenium-ide-logo-512.png', to: './assets/images/selenium-ide-logo-512.png' },

// { from: './vendor/superhero.min.css', to: './assets/stylesheets/superhero.min.css' }
]),
new HtmlWebpackPlugin({
filename: './options.html',
template: './src/views/options.pug'
template: './src/views/options.pug',
chunks: ['extension'],
}),
new HtmlWebpackPlugin({
filename: './ide.html',
template: './src/views/ide.pug'
template: './src/views/ide.pug',
chunks: ['extension'],
}),
new HtmlWebpackPlugin({
filename: './popup.html',
template: './src/views/popup.pug'
template: './src/views/popup.pug',
chunks: ['extension'],
}),
],
resolve: {
Expand Down

0 comments on commit 73fd29a

Please sign in to comment.