Skip to content

Commit

Permalink
💄 Move lib -> src
Browse files Browse the repository at this point in the history
  • Loading branch information
59naga committed May 13, 2015
1 parent c4c37f2 commit 649663a
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 21 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
@@ -1,9 +1,11 @@
v0.1.28 / Apr 23 2015
v0.1.28 / May 14 2015
=========================
* [`unknown`][22] :bug: Fix [#4][22A]
* [`unknown`][23] Change `--watch`,`--lint` Default `"spec_dir/*.coffee,lib/**/*.coffee,.*.coffee"` to `"spec_dir/*.coffee,src/**/*.coffee,.*.coffee"`

[22]: https://github.com/59naga/jasminetea/commit/
[22A]: https://github.com/59naga/jasminetea/issues/4
[23]: https://github.com/59naga/jasminetea/commit/

v0.1.27 / Mar 29 2015
=========================
Expand Down
6 changes: 3 additions & 3 deletions README.md
@@ -1,9 +1,9 @@
# ![jasminetea][.svg] jasminetea [![NPM version][npm-image]][npm] [![Build Status][travis-image]][travis] [![Coverage Status][coveralls-image]][coveralls]

> CLI Collection, Quick start [jasmine2][d-1] for [CoffeeScript][d-5].
> CLI Collection, Quick start [Jasmine2][d-1] for [CoffeeScript][d-5].
1. Without configuration file
2. Can be running spec. by [jasmine2][d-1]
2. Can be running spec. by [Jasmine2][d-1]
3. Can be calculate code caverage. by [iblik][d-2]
4. Can be checking code quality. by [coffeelint][d-3]
4. Can be running spec for e2e. by [protractor][d-4]
Expand Down Expand Up @@ -48,7 +48,7 @@ Enable `jasminetea specDir` commands. then can immediately run.
# -d --debug Output raw commands and stdout $ for --cover,--lint,--e2e
```

`--watch`,`--lint` Default see `"spec_dir/*.coffee,lib/**/*.coffee,*.coffee"`
`--watch`,`--lint` Default see `"spec_dir/*.coffee,src/**/*.coffee,*.coffee"`

## Example
```bash
Expand Down
12 changes: 7 additions & 5 deletions jasminetea
@@ -1,11 +1,13 @@
#!/usr/bin/env node

// Avoid conflicts with another version
if(typeof require('module')._extensions['.coffee']==='undefined'){
require('coffee-script/register');
var Jasminetea,jasminetea;
if(require('module')._extensions['.coffee']==null){
Jasminetea= require('./lib/jasminetea');
}

var jasminetea= new (require('./lib/jasminetea'));
else{
Jasminetea= require('./src/jasminetea');
}
jasminetea= new Jasminetea;

if(module.parent===null){
// Fix exception of CLI / cover
Expand Down
9 changes: 5 additions & 4 deletions package.json
Expand Up @@ -2,16 +2,17 @@
"name": "jasminetea",
"bin" : "jasminetea",
"main": "jasminetea",
"version": "0.1.30-rc.1",
"description": "Quick start jasmine2 for CoffeeScript",
"version": "0.1.30-rc.2",
"description": "Quick start Jasmine2 for CoffeeScript",

"scripts": {
"postinstall": "coffee -o lib -c src",
"help": "node jasminetea",

"start": "node jasminetea test --cover --verbose --watch --timeout 30000",

"test": "node jasminetea test --e2e --cover --debug --timeout 20000",
"posttest": "node jasminetea test --cover --report --lint --verbose --debug --timeout 20000"
"test": "node jasminetea test --e2e --cover --timeout 20000",
"posttest": "node jasminetea test --cover --report --verbose --timeout 20000"
},
"scriptsForTravis": {
"npm_api_key": "echo -n \"username:password\" | base64",
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions lib/jasminetea.coffee → src/jasminetea.coffee
Expand Up @@ -38,7 +38,7 @@ class Jasminetea extends require './collection'

specDir= options.args[0]
specs= @getSpecGlobs specDir,options.recursive,options.file
scripts= @getScriptGlobs 'lib',specDir,options.recursive
scripts= @getScriptGlobs 'src',specDir,options.recursive

options.watch= scripts if options.watch is yes
options.watch= options.watch.split(',') if typeof options.watch is 'string'
Expand Down Expand Up @@ -162,7 +162,7 @@ class Jasminetea extends require './collection'

# Via Jasminetea.run for Protractor conf.js
jasmineNodeOpts= Jasminetea::config.jasmineNodeOpts
jasmineNodeOpts.isVerbose= true if process.env.JASMINETEA_VERBOSE isnt 'undefined'
jasmineNodeOpts.isVerbose= true if process.env.JASMINETEA_VERBOSE isnt 'undefined'
jasmineNodeOpts.defaultTimeoutInterval= process.env.JASMINETEA_TIMEOUT
jasmineNodeOpts.includeStackTrace= process.env.JASMINETEA_STACKTRACE

Expand Down
6 changes: 3 additions & 3 deletions lib/utility.coffee → src/utility.coffee
Expand Up @@ -46,14 +46,14 @@ class Utility
globs.push path.join specDir,filename
globs

getScriptGlobs: (libDir,specDir,recursive=null,filename='*.coffee')->
getScriptGlobs: (srcDir,specDir,recursive=null,filename='*.coffee')->
cwd= '.' if specDir isnt '.'
libDir= path.join(libDir,'**') if recursive?
srcDir= path.join(srcDir,'**') if recursive?
specDir= path.join(specDir,'**') if recursive?

globs= []
globs.push path.join(cwd,filename) if cwd?
globs.push path.join libDir,filename
globs.push path.join srcDir,filename
globs.push path.join specDir,filename
globs

Expand Down
2 changes: 1 addition & 1 deletion test/collection.spec.coffee
@@ -1,4 +1,4 @@
collection= new (require '../lib/collection')
collection= new (require '../src/collection')
properties= Object.keys collection.__proto__
i= 1

Expand Down
2 changes: 1 addition & 1 deletion test/jasminetea.spec.coffee
@@ -1,4 +1,4 @@
jasminetea= new (require '../lib/jasminetea')
jasminetea= new (require '../src/jasminetea')
properties= Object.keys jasminetea.__proto__
i= 1

Expand Down
2 changes: 1 addition & 1 deletion test/utility.spec.coffee
@@ -1,4 +1,4 @@
utility= new (require '../lib/utility')
utility= new (require '../src/utility')
properties= Object.keys utility.__proto__
i= 1

Expand Down

0 comments on commit 649663a

Please sign in to comment.