lib/papers/configuration.rb in papers-1.3.0 vs lib/papers/configuration.rb in papers-1.3.1
- old
+ new
@@ -6,13 +6,15 @@
attr_accessor :manifest_file
attr_accessor :validate_gems
attr_accessor :validate_javascript
attr_accessor :validate_bower_components
+ attr_accessor :validate_npm_packages
attr_accessor :javascript_paths
attr_accessor :bower_components_path
+ attr_accessor :npm_package_json_path
def initialize
@license_whitelist = [
'MIT',
'BSD',
@@ -30,18 +32,22 @@
@manifest_file = File.join(Dir.pwd, 'config', 'papers_manifest.yml')
@validate_gems = true
@validate_javascript = true
@validate_bower_components = false
+ @validate_npm_packages = false
+
@javascript_paths = [
File.join(Dir.pwd, 'app', 'assets', 'javascripts'),
File.join(Dir.pwd, 'lib', 'assets', 'javascripts'),
File.join(Dir.pwd, 'vendor', 'assets', 'javascripts')
]
@bower_components_path = File.join(Dir.pwd, 'vendor', 'assets', 'components')
+
+ @npm_package_json_path = File.join(Dir.pwd, 'package.json')
end
def validate_gems?
!!@validate_gems
end
@@ -51,7 +57,12 @@
end
def validate_bower_components?
!!@validate_bower_components
end
+
+ def validate_npm_packages?
+ !!@validate_npm_packages
+ end
+
end
end