requirejs_integrator 1.0.0
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 +15 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +3 -0
- data/LICENSE +675 -0
- data/README.md +53 -0
- data/data/requirejs_integrator/build_default.js +18 -0
- data/data/requirejs_integrator/r.js +29967 -0
- data/lib/requirejs_integrator.rb +1 -0
- data/lib/requirejs_integrator/tasks.rb +21 -0
- data/lib/requirejs_integrator/tasks/config.rake +41 -0
- data/lib/requirejs_integrator/tasks/rjs.rake +63 -0
- data/lib/requirejs_integrator/version.rb +22 -0
- metadata +152 -0
@@ -0,0 +1 @@
|
|
1
|
+
require 'requirejs_integrator/tasks'
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
# Copyright (C) 2015 Szymon Kopciewski
|
4
|
+
#
|
5
|
+
# This file is part of RequirejsIntegrator.
|
6
|
+
#
|
7
|
+
# This program is free software: you can redistribute it and/or modify
|
8
|
+
# it under the terms of the GNU General Public License as published by
|
9
|
+
# the Free Software Foundation, either version 3 of the License, or
|
10
|
+
# (at your option) any later version.
|
11
|
+
#
|
12
|
+
# This program is distributed in the hope that it will be useful,
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
# GNU General Public License for more details.
|
16
|
+
#
|
17
|
+
# You should have received a copy of the GNU General Public License
|
18
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
19
|
+
|
20
|
+
tasks_path = File.join(File.dirname(__FILE__), 'tasks')
|
21
|
+
Dir["#{tasks_path}/*.rake"].each { |ext| load ext } if defined?(Rake)
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
# Copyright (C) 2015 Szymon Kopciewski
|
4
|
+
#
|
5
|
+
# This file is part of RequirejsIntegrator.
|
6
|
+
#
|
7
|
+
# This program is free software: you can redistribute it and/or modify
|
8
|
+
# it under the terms of the GNU General Public License as published by
|
9
|
+
# the Free Software Foundation, either version 3 of the License, or
|
10
|
+
# (at your option) any later version.
|
11
|
+
#
|
12
|
+
# This program is distributed in the hope that it will be useful,
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
# GNU General Public License for more details.
|
16
|
+
#
|
17
|
+
# You should have received a copy of the GNU General Public License
|
18
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
19
|
+
|
20
|
+
require 'system_executor'
|
21
|
+
require 'stdout_outputter'
|
22
|
+
|
23
|
+
namespace :ri do
|
24
|
+
|
25
|
+
desc 'Install default r.js config'
|
26
|
+
task :config do
|
27
|
+
default_config_path = File.join(
|
28
|
+
Gem.datadir('requirejs_integrator'),
|
29
|
+
'build_default.js'
|
30
|
+
)
|
31
|
+
current_path = Rake.application.original_dir
|
32
|
+
current_configdir_path = File.join(current_path, 'config')
|
33
|
+
current_config_path = File.join(current_configdir_path, 'build.js')
|
34
|
+
unless File.exist?(current_config_path)
|
35
|
+
StdoutOutputter::Outputter.new.write '*** Creating default r.js configuration ***'
|
36
|
+
SystemExecutor::Executor.new.run "mkdir -p #{current_configdir_path}"
|
37
|
+
SystemExecutor::Executor.new.run "cp #{default_config_path} #{current_config_path}"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
# Copyright (C) 2015 Szymon Kopciewski
|
4
|
+
#
|
5
|
+
# This file is part of RequirejsIntegrator.
|
6
|
+
#
|
7
|
+
# This program is free software: you can redistribute it and/or modify
|
8
|
+
# it under the terms of the GNU General Public License as published by
|
9
|
+
# the Free Software Foundation, either version 3 of the License, or
|
10
|
+
# (at your option) any later version.
|
11
|
+
#
|
12
|
+
# This program is distributed in the hope that it will be useful,
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
# GNU General Public License for more details.
|
16
|
+
#
|
17
|
+
# You should have received a copy of the GNU General Public License
|
18
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
19
|
+
|
20
|
+
require 'exec_executor'
|
21
|
+
require 'system_executor'
|
22
|
+
require 'stdout_outputter'
|
23
|
+
|
24
|
+
namespace :ri do
|
25
|
+
|
26
|
+
desc 'Compile js'
|
27
|
+
task :compile do
|
28
|
+
rjs_path = File.join(Gem.datadir('requirejs_integrator'), 'r.js')
|
29
|
+
project_dir = ENV['project_dir'] || 'sinatra_ui'
|
30
|
+
public_dir = ENV['public_dir'] || 'public'
|
31
|
+
rjs_base_dir = ENV['rjs_base_dir'] || 'javascripts'
|
32
|
+
rjs_opt_dir = ENV['rjs_opt_dir'] || 'js'
|
33
|
+
appDir_path = File.join(
|
34
|
+
Rake.application.original_dir,
|
35
|
+
project_dir,
|
36
|
+
public_dir,
|
37
|
+
rjs_base_dir
|
38
|
+
)
|
39
|
+
dir_path = File.join(
|
40
|
+
Rake.application.original_dir,
|
41
|
+
project_dir,
|
42
|
+
public_dir,
|
43
|
+
rjs_opt_dir
|
44
|
+
)
|
45
|
+
mainConfigFile_path = File.join(
|
46
|
+
Rake.application.original_dir,
|
47
|
+
project_dir,
|
48
|
+
public_dir,
|
49
|
+
rjs_base_dir,
|
50
|
+
'main.js'
|
51
|
+
)
|
52
|
+
StdoutOutputter::Outputter.new.write "*** Compile js files ***"
|
53
|
+
SystemExecutor::Executor.new.run "node #{rjs_path} -o " \
|
54
|
+
+ "config/build.js " \
|
55
|
+
+ "appDir=#{appDir_path} " \
|
56
|
+
+ "baseUrl=./ " \
|
57
|
+
+ "mainConfigFile=#{mainConfigFile_path} " \
|
58
|
+
+ "dir=#{dir_path} "
|
59
|
+
end
|
60
|
+
|
61
|
+
task c: %w[compile]
|
62
|
+
|
63
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
# Copyright (C) 2015 Szymon Kopciewski
|
4
|
+
#
|
5
|
+
# This file is part of RequirejsIntegrator.
|
6
|
+
#
|
7
|
+
# This program is free software: you can redistribute it and/or modify
|
8
|
+
# it under the terms of the GNU General Public License as published by
|
9
|
+
# the Free Software Foundation, either version 3 of the License, or
|
10
|
+
# (at your option) any later version.
|
11
|
+
#
|
12
|
+
# This program is distributed in the hope that it will be useful,
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
# GNU General Public License for more details.
|
16
|
+
#
|
17
|
+
# You should have received a copy of the GNU General Public License
|
18
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
19
|
+
|
20
|
+
module RequirejsIntegrator
|
21
|
+
VERSION = '1.0.0'
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,152 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: requirejs_integrator
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Szymon Kopciewski
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-07-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: exec_executor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: system_executor
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: stdout_outputter
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ! '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec-given
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: ''
|
112
|
+
email: s.kopciewski@gmail.com
|
113
|
+
executables: []
|
114
|
+
extensions: []
|
115
|
+
extra_rdoc_files: []
|
116
|
+
files:
|
117
|
+
- CHANGELOG.md
|
118
|
+
- Gemfile
|
119
|
+
- LICENSE
|
120
|
+
- README.md
|
121
|
+
- data/requirejs_integrator/build_default.js
|
122
|
+
- data/requirejs_integrator/r.js
|
123
|
+
- lib/requirejs_integrator.rb
|
124
|
+
- lib/requirejs_integrator/tasks.rb
|
125
|
+
- lib/requirejs_integrator/tasks/config.rake
|
126
|
+
- lib/requirejs_integrator/tasks/rjs.rake
|
127
|
+
- lib/requirejs_integrator/version.rb
|
128
|
+
homepage: https://github.com/skopciewski/requirejs_integrator
|
129
|
+
licenses:
|
130
|
+
- GPL-3.0
|
131
|
+
metadata: {}
|
132
|
+
post_install_message:
|
133
|
+
rdoc_options: []
|
134
|
+
require_paths:
|
135
|
+
- lib
|
136
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
137
|
+
requirements:
|
138
|
+
- - ! '>='
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
version: '0'
|
141
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ! '>='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
requirements: []
|
147
|
+
rubyforge_project:
|
148
|
+
rubygems_version: 2.2.5
|
149
|
+
signing_key:
|
150
|
+
specification_version: 4
|
151
|
+
summary: ''
|
152
|
+
test_files: []
|