Created
October 30, 2015 02:14
-
-
Save usingthesystem/938d7cd603643dba263b to your computer and use it in GitHub Desktop.
Atom.io webpack-starter code snippets
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
| # Your snippets | |
| # | |
| # Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
| # expand the prefix into a larger code block with templated values. | |
| # | |
| # You can create a new snippet in this file by typing "snip" and then hitting | |
| # tab. | |
| # | |
| # An example CoffeeScript snippet to expand log to console.log: | |
| # | |
| # '.source.coffee': | |
| # 'Console log': | |
| # 'prefix': 'log' | |
| # 'body': 'console.log $1' | |
| # | |
| # Each scope (e.g. '.source.coffee' above) can only be declared once. | |
| # | |
| # This file uses CoffeeScript Object Notation (CSON). | |
| # If you are unfamiliar with CSON, you can read more about it in the | |
| # Atom Flight Manual: | |
| # https://atom.io/docs/latest/using-atom-basic-customization#cson | |
| '.source.stylus': | |
| 'style mod tmpl': | |
| 'prefix': 'bbstyl' | |
| 'body': """ | |
| .modules.${1:module-name} | |
| ${2} | |
| """ | |
| '.source.coffee': | |
| '@$el.each': | |
| 'prefix': 'bbeleach' | |
| 'body': """ | |
| ${1:functionName}: => | |
| @$${2:element}.each @_${3:taskForEachElement} | |
| _${3:taskForEachElement}: (index, element) => | |
| $el = $(element) | |
| $4 | |
| """ | |
| 'trigClk: (e) =>': | |
| 'prefix': 'bbelclick' | |
| 'body': """ | |
| ${1:clickFunctionName}: (e) => | |
| e.preventDefault() | |
| $el = $(e.currentTarget) | |
| $2 | |
| """ | |
| 'class ModuleClass': | |
| 'prefix': 'bbclass' | |
| 'body': """ | |
| Module = require 'helpers/module' | |
| class ${1:ModuleName} extends Module | |
| elements: | |
| ${2:elementKey}: '${3:cssSelector}' | |
| events: | |
| '${4:eventName cssSelector}': '${5:eventFunctionName}' | |
| bb$6 | |
| module.exports = ${1:ModuleName} | |
| """ | |
| '.source.jade': | |
| 'jade mod tmpl': | |
| 'prefix': 'bbview' | |
| 'body': """ | |
| div(class=d.baseClasses) | |
| .container | |
| .row | |
| .col-xs-12 | |
| $1 | |
| """ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment