Skip to content

Commit

Permalink
Change to gen-examples from within tmp
Browse files Browse the repository at this point in the history
Within tmp, jscs and eslint don't want to lint!
  • Loading branch information
justin808 committed Jan 25, 2016
1 parent 678546e commit aac460f
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@
.ruby-gemset

node_modules
/tmp/examples

/node_package/lib

npm-debug.*
spec/dummy/client/npm-debug.log.*

gen_examples
/gen-examples
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ ruby-lint.yml
spec
node_modules
tmp
gen-examples
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ AllCops:
- !ruby/regexp /old_and_unused\.rb$/
- 'spec/react_on_rails/dummy-for-generators/**/*'
- 'spec/dummy/bin/**/*'
- 'tmp/examples/**/*'
- 'gen-examples/examples/**/*'

Metrics/LineLength:
Max: 120
Expand Down
3 changes: 2 additions & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ bundle && npm i && rake examples:prepare_all && rake symlink_node_package && rak
It's critical to configure your IDE/editor to ignore certain directories. Otherwise your IDE might slow to a crawl!

* /coverage
* /tmp (takes care of /tmp/examples)
* /tmp
* /gen-examples
* /node_package/lib
* /node_modules
* /spec/dummy/app/assets/javascripts/generated
Expand Down
2 changes: 1 addition & 1 deletion docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Install https://github.com/svenfuchs/gem-release

```bash
# Having the examples prevents publishing
rm -rf tmp/examples
rm -rf gen-examples/examples
gem bump
# Or manually update the version number
cd spec/dummy
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion node_package/scripts/symlink-node-package
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ root_path=${DIR}/../..
(cd $root_path && npm link)

# Link the example apps to use react_on_rails node_package
examplesDir=${root_path}/tmp/examples
examplesDir=${root_path}/gen-examples/examples
if [ -d $examplesDir ] ; then
for type in $( ls $examplesDir ); do
d=$examplesDir/${type}/client
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@
"build": "node_package/scripts/build",
"eslint": "eslint . --ext .jsx and .js",
"jscs": "jscs . -e -v",
"lint:all": "npm run eslint && npm run jscs",
"lint": "node_package/scripts/lint && cd spec/dummy/client && npm run lint",
"lint:examples": "eslint gen_examples && jscs gen_examples",
"lint": "npm run eslint && npm run jscs",
"lint:fix": "node_package/scripts/lint-fix",
"check": "npm run lint && npm run test",
"prerelease": "npm run check && npm run clean && npm run build",
Expand Down
2 changes: 1 addition & 1 deletion rakelib/task_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def gem_root

# Returns the folder where examples are located
def examples_dir
File.join(gem_root, "tmp", "examples")
File.join(gem_root, "gen-examples", "examples")
end

def dummy_app_dirs
Expand Down
2 changes: 1 addition & 1 deletion react_on_rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Gem::Specification.new do |s|
s.homepage = "https://github.com/shakacode/react_on_rails"
s.license = "MIT"

s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|tmp|node_modules|node_package|coverage)/}) }
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|gen-examples|tmp|node_modules|node_package|coverage)/}) }
s.bindir = "exe"
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
s.require_paths = ["lib"]
Expand Down

0 comments on commit aac460f

Please sign in to comment.