Skip to content

Commit

Permalink
Rename paths, use commonjs2 as build target
Browse files Browse the repository at this point in the history
  • Loading branch information
richardvenneman committed Jul 11, 2016
1 parent 624aa3c commit e63771b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
var webpackConfig = require('./webpack.config');

webpackConfig.output = {
entry: './lib/js/floatl.js',
entry: './src/js/floatl.js',
output: {
library: 'floatl',
libraryTarget: 'umd',
filename: 'dist/js/floatl.js'
filename: 'lib/js/floatl.js'
}
};

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "floatl",
"version": "0.3.0",
"description": "A library agnostic, pragmatic implementation of the Float Label Pattern",
"main": "dist/js/floatl.js",
"main": "lib/js/floatl.js",
"dependencies": {},
"devDependencies": {
"autoprefixer": "^6.3.7",
Expand Down Expand Up @@ -36,10 +36,10 @@
"test": "karma start --single-run",
"tdd": "karma start",
"build:js": "webpack",
"build:css": "node-sass --output-style expanded lib/scss/floatl.scss | postcss -u autoprefixer --autoprefixer.browsers '> 3%, ie >= 8' > dist/css/floatl.css",
"build:css": "node-sass --output-style expanded src/scss/floatl.scss lib/css/floatl.css && postcss -u autoprefixer -b '> 3%, ie >= 8' lib/css/floatl.css -d lib/css",
"build": "npm run build:js && npm run build:css",
"watch:js": "onchange 'lib/js/*.js' -- npm run build:js",
"watch:css": "onchange 'lib/scss/*.scss' -- npm run build:css"
"watch:js": "onchange 'src/js/*.js' -- npm run build:js",
"watch:css": "onchange 'src/scss/*.scss' -- npm run build:css"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion test/floatlTest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Floatl from '../lib/js/floatl.js';
import Floatl from '../src/js/floatl.js';

const focusedClass = 'floatl--focused';
const activeClass = 'floatl--active';
Expand Down
4 changes: 2 additions & 2 deletions test/utilsTest.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getElement, addClass, removeClass } from '../lib/js/utils.js';
import { addEventListener } from '../lib/js/utils.js';
import { getElement, addClass, removeClass } from '../src/js/utils.js';
import { addEventListener } from '../src/js/utils.js';

describe('getElement', () => {
beforeEach(function() {
Expand Down
8 changes: 4 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
module.exports = {
entry: {
index: './lib/js/index.js'
index: './src/js/index.js'
},

devtool: '#inline-source-map',

output: {
path: './dist/js',
path: './lib/js',
filename: 'floatl.js',
library: 'Floatl',
libraryTarget: 'var'
libraryTarget: 'commonjs2'
},

resolve: {
moduleDirectories: ['lib/js']
moduleDirectories: ['src/js']
},

module: {
Expand Down

0 comments on commit e63771b

Please sign in to comment.