Skip to content

Commit

Permalink
add proper exporting so module can be imported
Browse files Browse the repository at this point in the history
  • Loading branch information
aarohmankad committed Jun 16, 2019
1 parent f65331a commit 8382d31
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 29 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export const Cover = require('./Cover');
export const Sidebar = require('./Sidebar');
export const Stack = require('./Stack');

export Cover from './components/Cover';
export Sidebar from './components/Sidebar';
export Stack from './components/Stack';
22 changes: 0 additions & 22 deletions lib/every-layout.js

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"name": "every-layout",
"version": "1.0.2",
"description": "Composable layouts using CSS best practices",
"main": "./lib/every-layout.js",
"main": "./build/every-layout.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack",
"publish": "npm run build && npm publish"
"prepublish": "rm -rf ./build && npm run build"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
mode: 'production',
entry: './index.js',
output: {
path: path.resolve('lib'),
path: path.resolve('build'),
filename: 'every-layout.js',
libraryTarget: 'commonjs2',
},
Expand Down

0 comments on commit 8382d31

Please sign in to comment.