Skip to content

Commit

Permalink
Boom!
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomek Wiszniewski committed Nov 14, 2015
0 parents commit d3015d7
Show file tree
Hide file tree
Showing 21 changed files with 529 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .editorconfig
@@ -0,0 +1,36 @@
#
# Text editor configuration
# =========================
#
# This file describes the end-of-line character, indentation and other rules for
# text files – in a format compatible with virtually any text editor. It really
# helps to have all that consistent, without manual labor. You'll probably want
# a plugin for your editor. Go get one from <http://editorconfig.org>.
#

root = true


# General rules
# -------------
# - Unicode
# - Unix-style line endings
# - Newline before EOF
# - No sloppy trailing spaces
# - Two-space indentation

[*]
end_of_line = lf
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2


# Files that need whitespace at the end of lines
# ----------------------------------------------
# - Markdown

[*.md]
trim_trailing_whitespace = false
13 changes: 13 additions & 0 deletions .eslintignore
@@ -0,0 +1,13 @@
#
# Files ignored by ESLint
# =======================
#

# - Built files
./*.js
!./module.js
!./test.js
./*/
!./module/
!./test/
!./Readme/
7 changes: 7 additions & 0 deletions .eslintrc
@@ -0,0 +1,7 @@
{
"extends": "airbnb/base",
"rules": {
"curly": 0,
"no-undef": 2
}
}
112 changes: 112 additions & 0 deletions .gitattributes
@@ -0,0 +1,112 @@
#
# File type specific Git settings
# ===============================
#


# Default
# -------
# If a file doesn’t match anything below, fall back to autodetection.
# <http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/>.
* text=auto


# Text files
# ----------
# Always perform CRLF → LF normalization on these.

# * Source code
*.js text
*.sh text
*.fish text

# * Docs
*.md text

# * Config and data files
*.json text
*.{yml,yaml} text
.editorconfig text
.gitattributes text
.gitignore text
.jscsrc text
.jshintignore text
.jshintrc text
.npmignore text

# * Web stuff
*.html text
*.svg text
*.mustache text

# * Other text files
*.csv text
*.xml text


# Smart diffs
# -----------
# Show approximate diffs for binary files by converting them to plain text.

# * Show PDF and *MS Office* documents as text
# – if you’re not on *Git Bash*, put this into your .gitconfig:
# [diff "astextplain"]
# textconv = pdf2txt
# binary = true
*.pdf diff=astextplain
*.doc diff=astextplain
*.docx diff=astextplain
*.dot diff=astextplain
*.rtf diff=astextplain

# * Show ODF documents as text
# – install *odt2txt* and put this into your .gitconfig:
# [diff "odf"]
# textconv=odt2txt
# binary = true
.odt diff=odf
.ods diff=odf
.odp diff=odf
.odb diff=odf
.odg diff=odf
.odf diff=odf

# * Show EXIF data from JPEG images
# – install *exif* and put this into your .gitconfig:
# [diff "jpg"]
# textconv = exif
# binary = true
*.{jpg,jpeg} diff=exif


# Plain binary files
# ------------------
# Just treat them as blobs.

# * Binary image formats
*.png binary
*.gif binary
*.xcf binary
*.ico binary
*.psd binary
*.ai binary
*.sketch binary

# * Video and audio files
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.fla binary
*.swf binary

# * Archives
*.gz binary
*.zip binary
*.7z binary
*.tar binary
*.rar binary

# * Fonts
*.ttf binary
*.otf binary
27 changes: 27 additions & 0 deletions .gitignore
@@ -0,0 +1,27 @@
#
# Files ignored by Git
# ====================
#

# - Built files
/*.js
!/module.js
!/test.js
/*/
!/module/
!/test/
!/Readme/

# - All files and directories starting with "#"
\#*

# - NPM stuff
/node_modules/
/npm-debug.log

# - Test coverage reports
/coverage/

# - Editor files
*.sublime-project
*.sublime-workspace
18 changes: 18 additions & 0 deletions .travis.yml
@@ -0,0 +1,18 @@
sudo:
false

branches:
only:
- master
- travis-debug

before_install:
git config user.name "Travis CI"

language:
node_js
node_js:
- stable

after_script:
npm run coveralls
7 changes: 7 additions & 0 deletions License.md
@@ -0,0 +1,7 @@
Copyright © 2015 Tomek Wiszniewski

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
68 changes: 68 additions & 0 deletions Readme.md
@@ -0,0 +1,68 @@
[![Coveralls – test coverage
](https://img.shields.io/coveralls/tomekwi/<!--name-->.svg?style=flat-square)
](https://coveralls.io/r/tomekwi/<!--name-->)
[![Travis – build status
](https://img.shields.io/travis/tomekwi/<!--name-->/master.svg?style=flat-square)
](https://travis-ci.org/tomekwi/<!--name-->)
[![David – status of dependencies
](https://img.shields.io/david/tomekwi/<!--name-->.svg?style=flat-square)
](https://david-dm.org/tomekwi/<!--name-->)
[![Stability: experimental
](https://img.shields.io/badge/stability-experimental-yellow.svg?style=flat-square)
](https://nodejs.org/api/documentation.html#documentation_stability_index)
[![Code style: airbnb
](https://img.shields.io/badge/code%20style-airbnb-777777.svg?style=flat-square)
](https://github.com/airbnb/javascript)




<!--title-->
<!--title-underline-->

**<!--description-->**


**Heads up!** This is totally a work in progress. [Thoughts and ideas][] are very welcome.

[Thoughts and ideas]: https://github.com/tomekwi/<!--name-->/issues




<a id="/installation"></a>&nbsp;

Installation
------------

```sh
# Globally for a user:
npm install --global <!--name-->

# …or locally for a project:
npm install --save-dev <!--name-->
```




<a id="/usage"></a>&nbsp;

Usage
-----

<!-- @doxie.inject start -->
*Work in progress…*
<!-- @doxie.inject end -->



<a id="/license"></a>&nbsp;

License
-------

[MIT][] © [Tomek Wiszniewski][]

[MIT]: ./License.md
[Tomek Wiszniewski]: https://github.com/tomekwi
60 changes: 60 additions & 0 deletions _bootstrap.fish
@@ -0,0 +1,60 @@
#!/usr/bin/fish

if begin
test (count $argv) -lt 2
or test $argv[1] = '--help'
end
echo 'Usage: ./_bootstrap.sh NAME DESCRIPTION [TITLE [REPO]]'
exit 0
end

set name $argv[1]
set description $argv[2]

if test (count $argv) -lt 3; set title $name
else; set title $argv[3]
end

if test (count $argv) -lt 4; set repo "git@github.com:tomekwi/$name"
else; set repo $argv[4]
end

echo \n'Doing the initial commit…'
git remote rename origin boilerplate
git remote add origin $repo
and if test (count (git branch --list master)) -gt 0
git branch -D master
else; true
end
and git checkout --orphan master
and git commit -m 'Boom!'
and echo '…done.'
or echo '…failed!'

echo \n'Updating name and description…'
for file in package.json Readme.md
sed --in-place \
-e "s|<\!--name-->|$name|g" \
-e "s|<\!--description-->|$description|g" \
-e "s|<\!--title-->|$title|g" \
-e 's|<\!--title-underline-->|'(echo -n $title | sed s/./=/g)'|g' \
-e "s|<\!--repo-->|$repo|g" \
$file
end
and git commit -m 'Update name and description' package.json Readme.md
and echo '…done.'
or echo '…failed!'

echo \n'Bootstrapping dependencies…'
npm run _bootstrap
and git commit -m 'Bootstrap dependencies' package.json
and echo '…done.'
or echo '…failed!'

echo \n'Removing the bootstrap script…'
git rm _bootstrap.fish
and git commit -m 'Remove the bootstrap script'
and echo '…done.'
or echo '…failed!'

echo \n'Done! Don’t forget to add some keywords to the `package.json`.'
1 change: 1 addition & 0 deletions module.js
@@ -0,0 +1 @@
export {default} from './module/index';
7 changes: 7 additions & 0 deletions module/bin/help/examples.js
@@ -0,0 +1,7 @@
const {bold} = require('chalk');

module.exports =
` ${bold('EXAMPLES')}
`;
7 changes: 7 additions & 0 deletions module/bin/help/options.js
@@ -0,0 +1,7 @@
const {bold} = require('chalk');

module.exports =
` ${bold('OPTIONS')}
-h --help Print a short synopsis (-h) or this help text (--help)
`;
6 changes: 6 additions & 0 deletions module/bin/help/synopsis.js
@@ -0,0 +1,6 @@
const {bold} = require('chalk');

module.exports =
` ${bold('SYNOPSIS')}
${require('./usage').replace(/^(?!$)/g, ' ')}`;
4 changes: 4 additions & 0 deletions module/bin/help/usage.js
@@ -0,0 +1,4 @@
export default
`Usage: …
or: … (-h|--help)
`;

0 comments on commit d3015d7

Please sign in to comment.