battletoads 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 279807575290a5be4fde2e46dcf714a65c67aa97
4
+ data.tar.gz: 4871084c916149c0334c2fb80d56a27f722e71c0
5
+ SHA512:
6
+ metadata.gz: e9d776ad5c1ce3aac62a96bfde012e6123d7b548c4b74099634ee489880f37587d0544c21cd9c6e11f6f917ea1b4a488fb5900aafadc91899484b57409dba9f3
7
+ data.tar.gz: 9c502214f980a94373c16507776f8ed443efce26b0d92f5d7241ceb7cc2f7ec51d86517a345e7c633dac45c198159c433607f247bf1836a581e154822978d9b0
data/.gitignore ADDED
@@ -0,0 +1,35 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /test/tmp/
9
+ /test/version_tmp/
10
+ /tmp/
11
+
12
+ ## Specific to RubyMotion:
13
+ .dat*
14
+ .repl_history
15
+ build/
16
+
17
+ ## Documentation cache and generated files:
18
+ /.yardoc/
19
+ /_yardoc/
20
+ /doc/
21
+ /rdoc/
22
+
23
+ ## Environment normalisation:
24
+ /.bundle/
25
+ /vendor/bundle
26
+ /lib/bundler/man/
27
+
28
+ # for a library or gem, you might want to ignore these files since the code is
29
+ # intended to run in multiple environments; otherwise, check them in:
30
+ Gemfile.lock
31
+ .ruby-version
32
+ .ruby-gemset
33
+
34
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
35
+ .rvmrc
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in battletoads.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Alexey Gaziev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
data/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # Battletoads
2
+ Tool to generate simple projects with PostCSS plugins
@@ -0,0 +1,21 @@
1
+ lib = File.expand_path('../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'battletoads/version'
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = 'battletoads'
7
+ s.version = Battletoads::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ['gazay']
10
+ s.licenses = ['MIT']
11
+ s.email = ['alex.gaziev@gmail.com']
12
+ s.homepage = 'https://github.com/gazay/battletoads'
13
+ s.summary = %q{Tooling for generate demo applications with PostCSS plugins}
14
+ s.description = %q{Tooling for generate demo applications with PostCSS plugins. Right now only gulp applications}
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.require_paths = ['lib']
18
+ s.required_ruby_version = '> 2.2.0'
19
+ s.add_dependency 'psych'
20
+ s.add_development_dependency 'rspec', '>= 3.0'
21
+ end
@@ -0,0 +1,2 @@
1
+ module Battletoads
2
+ end
@@ -0,0 +1,4 @@
1
+ class Battletoads
2
+ class Plugin
3
+ end
4
+ end
@@ -0,0 +1,3 @@
1
+ module Battletoads
2
+ VERSION = '0.0.1'
3
+ end
@@ -0,0 +1,49 @@
1
+ import gulp from 'gulp';
2
+ import eslint from 'gulp-eslint';
3
+ import postcss from 'gulp-postcss';
4
+ import use from 'postcss-use';
5
+ import rename from 'gulp-rename';
6
+
7
+ // Default
8
+
9
+ gulp.task('default', ['lint']);
10
+
11
+ // Build
12
+
13
+ gulp.task('build', () => {
14
+ return gulp.src(['**/*.input.css'])
15
+ .pipe(postcss([
16
+ use({ modules: [<%= plugins.map(&:escaped_name).join(',') %>]})
17
+ ]))
18
+ .pipe(rename(path => {
19
+ path.basename = path.basename.replace('.input', '');
20
+ path.extname = '.out.css';
21
+ }))
22
+ .pipe(gulp.dest('.'));
23
+ });
24
+
25
+ gulp.task('build-separate', [<%= plugins.map(&:escaped_name).join(',') %>])
26
+
27
+ // Build functions for each plugin independently
28
+
29
+ <%- plugins.each do |plugin| %>
30
+ gulp.task(<%= plugin.escaped_name %>, () => {
31
+ return gulp.src('<%= plugin.name %>/style.input.css')
32
+ .pipe(postcss(<%= plugin.postcss_arguments %>))
33
+ .pipe(rename(path => {
34
+ path.basename = path.basename.replace('.input', '');
35
+ path.extname = '.out.css';
36
+ }))
37
+ .pipe(gulp.dest('./<%= plugin.name %>'));
38
+ });
39
+
40
+ <%- end %>
41
+
42
+ // Lint
43
+
44
+ gulp.task('lint', () => {
45
+ return gulp.src(['*.js'])
46
+ .pipe(eslint())
47
+ .pipe(eslint.format())
48
+ .pipe(eslint.failAfterError());
49
+ });
@@ -0,0 +1,31 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <link rel="stylesheet" href="./style.out.css">
5
+ <style>table, tr, th, td { border: 1px solid black; }</style>
6
+ </head>
7
+ <body>
8
+ <h1><%= plugin.name %></h1>
9
+ <a href="javascript:history.back()">Back</a>
10
+ <table>
11
+ <tr>
12
+ <th>Input code</th>
13
+ <th>Output code</th>
14
+ <th>Postcss output</th>
15
+ </tr>
16
+ <%- plugin.examples.each do |ex| %>
17
+ <tr class='<%= ex.css_class %>'>
18
+ <td>
19
+ <%= ex.input %>
20
+ </td>
21
+ <td>
22
+ <%= ex.out %>
23
+ </td>
24
+ <td>
25
+ <%= ex.example_html %>
26
+ </td>
27
+ </tr>
28
+ <%- end %>
29
+ </table>
30
+ </body>
31
+ </html>
@@ -0,0 +1,8 @@
1
+ @use <%= plugin.name %>;
2
+
3
+ <%- plugin.styles.each do |s| %>
4
+ .<%= s.css_class %> {
5
+ <%= s.props.map { |k, v| "#{k}: #{v};" }.join("\n") %>
6
+ }
7
+
8
+ <%- end %>
metadata ADDED
@@ -0,0 +1,84 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: battletoads
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - gazay
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-08-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: psych
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '3.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '3.0'
41
+ description: Tooling for generate demo applications with PostCSS plugins. Right now
42
+ only gulp applications
43
+ email:
44
+ - alex.gaziev@gmail.com
45
+ executables: []
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - ".gitignore"
50
+ - Gemfile
51
+ - LICENSE
52
+ - README.md
53
+ - battletoads.gemspec
54
+ - lib/battletoads.rb
55
+ - lib/battletoads/plugin.rb
56
+ - lib/battletoads/version.rb
57
+ - lib/templates/gulpfile.babel.js.erb
58
+ - lib/templates/postcss-plugin/index.html.erb
59
+ - lib/templates/postcss-plugin/style.input.css.erb
60
+ homepage: https://github.com/gazay/battletoads
61
+ licenses:
62
+ - MIT
63
+ metadata: {}
64
+ post_install_message:
65
+ rdoc_options: []
66
+ require_paths:
67
+ - lib
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">"
71
+ - !ruby/object:Gem::Version
72
+ version: 2.2.0
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ requirements: []
79
+ rubyforge_project:
80
+ rubygems_version: 2.4.5
81
+ signing_key:
82
+ specification_version: 4
83
+ summary: Tooling for generate demo applications with PostCSS plugins
84
+ test_files: []