From 8b3b9052696992f5eec94997547d52b03cb8406e Mon Sep 17 00:00:00 2001 From: Ramana Venkata Date: Wed, 27 May 2015 13:03:18 +0530 Subject: [PATCH] Change the way prepublish works --- .gitignore | 1 + docs/demos.jsx | 2 +- index.jsx | 1 - package.json | 5 +++-- {lib => src}/default-props.js | 0 src/index.js | 1 + {lib => src}/initial-state.js | 0 {lib => src}/inner-slider.jsx | 0 {lib => src}/mixins/event-handlers.js | 0 {lib => src}/mixins/helpers.js | 0 {lib => src}/slider.jsx | 2 +- 11 files changed, 7 insertions(+), 5 deletions(-) delete mode 100644 index.jsx rename {lib => src}/default-props.js (100%) create mode 100644 src/index.js rename {lib => src}/initial-state.js (100%) rename {lib => src}/inner-slider.jsx (100%) rename {lib => src}/mixins/event-handlers.js (100%) rename {lib => src}/mixins/helpers.js (100%) rename {lib => src}/slider.jsx (97%) diff --git a/.gitignore b/.gitignore index 2577783a4..665d5972f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ demos/* demos1 TODO.md npm-debug.log +lib/ diff --git a/docs/demos.jsx b/docs/demos.jsx index 35e180845..dbaa1a900 100644 --- a/docs/demos.jsx +++ b/docs/demos.jsx @@ -1,7 +1,7 @@ 'use strict'; var React = require('react'); -var Slider = require('../'); +var Slider = require('../lib/slider'); var SingleItem = React.createClass({ render: function () { diff --git a/index.jsx b/index.jsx deleted file mode 100644 index 1234e4c0a..000000000 --- a/index.jsx +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/slider.jsx'); \ No newline at end of file diff --git a/package.json b/package.json index 9fd1e1690..17ac095bb 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,10 @@ "name": "react-slick", "version": "0.4.1", "description": " React port of slick carousel", - "main": "index.jsx", + "main": "./lib", "scripts": { "start": "./node_modules/.bin/gulp server", - "prepublish": "./node_modules/.bin/gulp dist" + "prepublish": "./node_modules/.bin/babel ./src --out-dir ./lib" }, "author": "Kiran Abburi", "license": "MIT", @@ -23,6 +23,7 @@ ], "devDependencies": { "autoprefixer-core": "^5.1.11", + "babel": "^5.4.7", "babel-core": "^5.4.7", "babel-loader": "^5.1.3", "deepmerge": "^0.2.10", diff --git a/lib/default-props.js b/src/default-props.js similarity index 100% rename from lib/default-props.js rename to src/default-props.js diff --git a/src/index.js b/src/index.js new file mode 100644 index 000000000..6d88deffc --- /dev/null +++ b/src/index.js @@ -0,0 +1 @@ +module.exports = require('./slider'); diff --git a/lib/initial-state.js b/src/initial-state.js similarity index 100% rename from lib/initial-state.js rename to src/initial-state.js diff --git a/lib/inner-slider.jsx b/src/inner-slider.jsx similarity index 100% rename from lib/inner-slider.jsx rename to src/inner-slider.jsx diff --git a/lib/mixins/event-handlers.js b/src/mixins/event-handlers.js similarity index 100% rename from lib/mixins/event-handlers.js rename to src/mixins/event-handlers.js diff --git a/lib/mixins/helpers.js b/src/mixins/helpers.js similarity index 100% rename from lib/mixins/helpers.js rename to src/mixins/helpers.js diff --git a/lib/slider.jsx b/src/slider.jsx similarity index 97% rename from lib/slider.jsx rename to src/slider.jsx index dbb005f3d..64f4bf9ed 100644 --- a/lib/slider.jsx +++ b/src/slider.jsx @@ -2,7 +2,7 @@ import React from 'react'; -import InnerSlider from './inner-slider.jsx'; +import InnerSlider from './inner-slider'; import _sortBy from 'lodash.sortby'; import _pluck from 'lodash.pluck'; import _filter from 'lodash.filter';