在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:jquery-boilerplate/jquery-boilerplate开源软件地址:https://github.com/jquery-boilerplate/jquery-boilerplate开源编程语言:JavaScript 83.2%开源软件介绍:jQuery BoilerplateA jump-start for jQuery plugins developmentSo, you've tried your hand at writing jQuery plugins and you're comfortable putting together something that probably works. Awesome! Thing is, you think there might be better ways you could be writing them - you've seen them done a number of different ways in the wild, but aren't really sure what the differences between these patterns are or how to get started with them. This project won't seek to provide a perfect solution to every possible pattern, but will attempt to cover a simple template for beginners and above. By using a basic defaults object, simple constructor for assigning the element to work with and extending options with defaults and a lightweight wrapper around the constructor to avoid issues with multiple instantiations. Usage
StructureThe basic structure of the project is given in the following way:
demo/Contains a simple HTML file to demonstrate your plugin. dist/This is where the generated files are stored once Grunt runs. src/Contains the files responsible for your plugin, you can choose between JavaScript or CoffeeScript. .editorconfigThis file is for unifying the coding style for different editors and IDEs.
.gitignoreList of files that we don't want Git to track.
.jshintrcList of rules used by JSHint to detect errors and potential problems in JavaScript.
.travis.ymlDefinitions for continous integration using Travis.
Gruntfile.jsContains all automated tasks using Grunt.
package.jsonSpecify all dependencies loaded via Node.JS.
GuidesHow did we get here?Have you got in this repo and still not sure about using this boilerplate? Well, extending jQuery with plugins and methods is very powerful and can save you and your peers a lot of development time by abstracting your most clever functions into plugins. This awesome guide, adapted from jQuery Plugins/Authoring, will outline the basics, best practices, and common pitfalls to watch out for as you begin writing your plugin. How to publish plugins?Also, check our guide on How to publish a plugin in jQuery Plugin Registry! Note: The jQuery Plugin Registry is in read-only mode. New plugin releases will not be processed. jQuery recommends moving to npm, using "jquery-plugin" as the keyword in your package.json. See how to publish into npm registry. TeamjQuery Boilerplate was made with love by these guys and a bunch of awesome contributors. | | --- | --- | --- | --- | --- | --- | --- Zeno Rocha | Addy Osmani | Helder Santana ContributingCheck CONTRIBUTING.md for more information. HistoryCheck Releases for detailed changelog. LicenseMIT License © Zeno Rocha |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论