Sortable list based on this Framer.js example.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function iteratorDir(dir, recursive) { | |
| // 去除尾部的'/'字符 | |
| if (dir[dir.length - 1] == '/') { | |
| dir = dir.substring(0, dir.length - 1); | |
| } | |
| var dirList = []; | |
| var items = fs.readdirSync(dir); | |
| items.forEach((item, index) => { | |
| var path = dir + '/' + item; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <ruleset name="PHP_CodeSniffer"> | |
| <description>The coding standard for PHP_CodeSniffer itself.</description> | |
| <exclude-pattern>*/vendor/*</exclude-pattern> | |
| <rule ref="PSR2"/> | |
| </ruleset> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <phpunit backupGlobals="false" | |
| backupStaticAttributes="false" | |
| bootstrap="tests/bootstrap.php" | |
| colors="true" | |
| convertErrorsToExceptions="true" | |
| convertNoticesToExceptions="true" | |
| convertWarningsToExceptions="true" | |
| processIsolation="false" | |
| stopOnFailure="false" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| // See https://go.microsoft.com/fwlink/?LinkId=759670 | |
| // for the documentation about the jsconfig.json format | |
| "compilerOptions": { | |
| "target": "es6", | |
| "module": "commonjs", | |
| "allowSyntheticDefaultImports": true | |
| }, | |
| "exclude": [ | |
| "node_modules", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style | |
| 'extends': 'standard', | |
| 'env': { | |
| 'browser': true, | |
| 'commonjs': true, | |
| 'es6': true, | |
| 'node': true | |
| }, | |
| 'globals': { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <ruleset name="PHP_CodeSniffer"> | |
| <description>The coding standard for PHP_CodeSniffer itself.</description> | |
| <exclude-pattern>*/vendor/*</exclude-pattern> | |
| <!-- 2. General --> | |
| <!-- 2.1 Basic Coding Standard --> | |
| <!-- Include the whole PSR-1 standard --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install brew | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| # Install composer | |
| brew install homebrew/php/composer | |
| ### PHPCS | |
| composer global require "squizlabs/php_codesniffer=*" | |
| # Add to your .bash_profile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <phpunit backupGlobals="false" | |
| backupStaticAttributes="false" | |
| bootstrap="tests/bootstrap.php" | |
| colors="true" | |
| convertErrorsToExceptions="true" | |
| convertNoticesToExceptions="true" | |
| convertWarningsToExceptions="true" | |
| processIsolation="false" | |
| stopOnFailure="false" |
OlderNewer