diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 604c94e..0000000 --- a/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -# top-most EditorConfig file -root = true - -# Unix-style newlines with a newline ending every file -[*.{js,css}] -end_of_line = lf -insert_final_newline = true -indent_style = space -indent_size = 2 diff --git a/.gitignore b/.gitignore deleted file mode 100644 index f8d8a67..0000000 --- a/.gitignore +++ /dev/null @@ -1,28 +0,0 @@ -*.iml -*.log -.idea/ -.ipr -.iws -*~ -~* -*.diff -*.patch -*.bak -.DS_Store -Thumbs.db -.project -.*proj -.svn/ -*.swp -*.swo -*.pyc -*.pyo -.build -node_modules -_site -sea-modules -spm_modules -.cache -dist -assets/**/*.css -build/ \ No newline at end of file diff --git a/.jscsrc b/.jscsrc deleted file mode 100644 index 20b0f4d..0000000 --- a/.jscsrc +++ /dev/null @@ -1,27 +0,0 @@ -{ - "requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"], - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"], - "requireSpacesInFunctionExpression": { - "beforeOpeningCurlyBrace": true - }, - "disallowSpacesInsideArrayBrackets": true, - "disallowSpacesInsideObjectBrackets": true, - "disallowSpacesInsideParentheses": true, - "disallowQuotedKeysInObjects": "allButReserved", - "disallowSpaceAfterObjectKeys": true, - "requireSpaceBeforeBinaryOperators": ["-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<=" ], - "requireSpacesInConditionalExpression": { - "afterTest": true, - "beforeConsequent": true, - "afterConsequent": true, - "beforeAlternate": true - }, - "requireSpaceAfterBinaryOperators": ["/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], - "disallowKeywords": [ "with" ], - "disallowSpaceAfterPrefixUnaryOperators": [ "!" , "++", "--", "+", "-", "~"], - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--", ","], - "disallowMultipleLineBreaks": true, - "disallowKeywordsOnNewLine": ["else"], - "safeContextKeyword": "self", - "excludeFiles": ["lib/**/parser.js"] -} \ No newline at end of file diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index ef5e85e..0000000 --- a/.jshintrc +++ /dev/null @@ -1,28 +0,0 @@ -{ - "camelcase": true, - "curly": true, - "eqeqeq": true, - "freeze": true, - "indent": 4, - "latedef": "nofunc", - "quotmark": "false", - "nonew": true, - "newcap": false, - "immed": true, - "noarg": true, - "eqnull": true, - "trailing": true, - "undef": true, - "unused": true, - "browser": true, - "node": true, - "esnext": true, - "globals": { - "describe": false, - "expect": false, - "beforeEach": false, - "afterEach": false, - "modulex": false, - "it": false - } -} \ No newline at end of file diff --git a/.npmignore b/.npmignore deleted file mode 100644 index e43e0f4..0000000 --- a/.npmignore +++ /dev/null @@ -1,29 +0,0 @@ -bower_components/ -build/ -*.cfg -node_modules/ -nohup.out -*.iml -.idea/ -.ipr -.iws -*~ -~* -*.diff -*.log -*.patch -*.bak -.DS_Store -Thumbs.db -.project -.*proj -.svn/ -*.swp -out/ -.build -node_modules -_site -sea-modules -spm_modules -.cache -dist \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2fde59c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: node_js -notifications: - email: - - yiminghe@gmail.com -node_js: -- 0.12 -before_script: -- npm start & -- npm install mocha-phantomjs -g -- phantomjs --version -script: -- npm test -- npm run-script browser-test -- npm run-script browser-test-cover \ No newline at end of file diff --git a/build/examples/common.js b/build/examples/common.js new file mode 100644 index 0000000..5acde6d --- /dev/null +++ b/build/examples/common.js @@ -0,0 +1,94 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // install a JSONP callback for chunk loading +/******/ var parentJsonpFunction = window["webpackJsonp"]; +/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) { +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0, callbacks = []; +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(installedChunks[chunkId]) +/******/ callbacks.push.apply(callbacks, installedChunks[chunkId]); +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ for(moduleId in moreModules) { +/******/ modules[moduleId] = moreModules[moduleId]; +/******/ } +/******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules); +/******/ while(callbacks.length) +/******/ callbacks.shift().call(null, __webpack_require__); +/******/ if(moreModules[0]) { +/******/ installedModules[0] = 0; +/******/ return __webpack_require__(0); +/******/ } +/******/ }; + +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // object to store loaded and loading chunks +/******/ // "0" means "already loaded" +/******/ // Array means "loading", array contains callbacks +/******/ var installedChunks = { +/******/ 1:0 +/******/ }; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + +/******/ // This file contains only the entry chunk. +/******/ // The chunk loading function for additional chunks +/******/ __webpack_require__.e = function requireEnsure(chunkId, callback) { +/******/ // "0" is the signal for "already loaded" +/******/ if(installedChunks[chunkId] === 0) +/******/ return callback.call(null, __webpack_require__); + +/******/ // an array means "currently loading". +/******/ if(installedChunks[chunkId] !== undefined) { +/******/ installedChunks[chunkId].push(callback); +/******/ } else { +/******/ // start chunk loading +/******/ installedChunks[chunkId] = [callback]; +/******/ var head = document.getElementsByTagName('head')[0]; +/******/ var script = document.createElement('script'); +/******/ script.type = 'text/javascript'; +/******/ script.charset = 'utf-8'; +/******/ script.async = true; + +/******/ script.src = __webpack_require__.p + "" + chunkId + "." + ({"0":"simple"}[chunkId]||chunkId) + ".js"; +/******/ head.appendChild(script); +/******/ } +/******/ }; + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ }) +/************************************************************************/ +/******/ ([]); \ No newline at end of file diff --git a/build/examples/index.html b/build/examples/index.html new file mode 100644 index 0000000..ffe23cd --- /dev/null +++ b/build/examples/index.html @@ -0,0 +1 @@ +
+/** @jsx React.DOM */
+// use jsx to render html, do not modify simple.html
+require('rc-slider/assets/index.css');
+var Slider = require('rc-slider');
+var React = require('react');
+// React.render(<Sliders marks={["一","二","三","四","五"]} index={3}/>, document.getElementById('__react-content'));
+// React.render(<Slider className='rc-slider' step={20}/>, document.getElementById('__react-content'));
+React.render(<Slider />, document.getElementById('__react-content'));
+
+
+