Skip to content

Commit 1349f37

Browse files
committed
Initial Commit
0 parents  commit 1349f37

File tree

5 files changed

+91
-0
lines changed

5 files changed

+91
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

index.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import './main.css';
2+
import 'jquery-ui/themes/base/core.css';
3+
import 'jquery-ui/themes/base/menu.css';
4+
import 'jquery-ui/themes/base/autocomplete.css';
5+
import 'jquery-ui/themes/base/theme.css';
6+
import $ from 'jquery';
7+
import autocomplete from 'jquery-ui/ui/widgets/autocomplete';
8+
9+
$('<h1>Welcome to the programming languages quiz</h1>').appendTo('body');
10+
new autocomplete({
11+
source: ['javascript', 'css', 'c', 'objectivec']
12+
}).element.appendTo('body').focus();

main.css

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
body {
2+
background: #fefefe;
3+
font-family: Sans-Serif;
4+
line-height: 1.5;
5+
}

package.json

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "webpack-jquery-ui",
3+
"version": "1.0.0",
4+
"description": "How to build an app with jQuery UI and webpack",
5+
"main": "index.js",
6+
"scripts": {
7+
"start": "webpack-dev-server --config webpack-config.js",
8+
"build": "webpack --config webpack-config.js",
9+
"test": "npm test"
10+
},
11+
"keywords": [
12+
"jquery-ui",
13+
"webpack"
14+
],
15+
"author": "Jörn Zaefferer",
16+
"license": "MIT",
17+
"dependencies": {
18+
"jquery": "^2.1.4",
19+
"jquery-ui": "jzaefferer/jquery-ui#webpack"
20+
},
21+
"devDependencies": {
22+
"babel-core": "^5.8.23",
23+
"babel-loader": "^5.3.2",
24+
"clean-webpack-plugin": "^0.1.3",
25+
"css-loader": "^0.16.0",
26+
"extract-text-webpack-plugin": "^0.8.2",
27+
"file-loader": "^0.8.4",
28+
"html-webpack-plugin": "^1.6.1",
29+
"style-loader": "^0.12.3",
30+
"webpack": "^1.12.2",
31+
"webpack-dev-server": "^1.11.0"
32+
}
33+
}

webpack-config.js

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
var Clean = require('clean-webpack-plugin');
2+
var ExtractTextPlugin = require('extract-text-webpack-plugin');
3+
var HtmlWebpackPlugin = require('html-webpack-plugin');
4+
5+
module.exports = {
6+
resolve: {
7+
extensions: ['', '.js', '.css'],
8+
},
9+
entry: {
10+
main: './index.js'
11+
},
12+
output: {
13+
path: './dist',
14+
filename: 'app.[hash].js'
15+
},
16+
module: {
17+
loaders: [
18+
{
19+
test: /\.js$/,
20+
exclude: /node_modules/,
21+
loader: 'babel'
22+
},
23+
{
24+
test: /\.css$/,
25+
loader: ExtractTextPlugin.extract("style-loader", "css-loader")
26+
},
27+
{
28+
test: /\.(jpg|png)$/,
29+
loader: 'file'
30+
},
31+
]
32+
},
33+
plugins: [
34+
new Clean(['dist']),
35+
new ExtractTextPlugin("app.[hash].css"),
36+
new HtmlWebpackPlugin({
37+
title: 'jQuery UI Autocomplete demo, built with webpack'
38+
})
39+
]
40+
};

0 commit comments

Comments
 (0)