Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit cd9798eb
authored
Apr 02, 2014
by
fundon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename `supportCS` to `supportsCoffee`
1 parent
e18f3d0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
bin/sequelize
bin/sequelize
View file @
cd9798e
...
@@ -7,7 +7,7 @@ var path = require("path")
...
@@ -7,7 +7,7 @@ var path = require("path")
,
moment
=
require
(
"moment"
)
,
moment
=
require
(
"moment"
)
,
_
=
Sequelize
.
Utils
.
_
,
_
=
Sequelize
.
Utils
.
_
,
url
=
require
(
"url"
)
,
url
=
require
(
"url"
)
,
support
CS
=
undefined
,
support
sCoffee
var
configuration
=
{
var
configuration
=
{
configFile
:
process
.
cwd
()
+
'/config/config.json'
,
configFile
:
process
.
cwd
()
+
'/config/config.json'
,
...
@@ -142,7 +142,7 @@ var readConfig = function() {
...
@@ -142,7 +142,7 @@ var readConfig = function() {
config
=
config
[
configuration
.
environment
]
config
=
config
[
configuration
.
environment
]
}
}
support
CS
=
program
.
coffee
||
config
.
coffee
support
sCoffee
=
program
.
coffee
||
config
.
coffee
return
config
return
config
}
}
...
@@ -212,7 +212,7 @@ if (program.migrate || program.undo) {
...
@@ -212,7 +212,7 @@ if (program.migrate || program.undo) {
var
sequelize
=
new
Sequelize
(
config
.
database
,
config
.
username
,
config
.
password
,
options
)
var
sequelize
=
new
Sequelize
(
config
.
database
,
config
.
username
,
config
.
password
,
options
)
,
migratorOptions
=
{
path
:
configuration
.
migrationsPath
}
,
migratorOptions
=
{
path
:
configuration
.
migrationsPath
}
if
(
support
CS
)
{
if
(
support
sCoffee
)
{
migratorOptions
=
_
.
merge
(
migratorOptions
,
{
filesFilter
:
/
\.
js$|
\.
coffee$/
})
migratorOptions
=
_
.
merge
(
migratorOptions
,
{
filesFilter
:
/
\.
js$|
\.
coffee$/
})
}
}
...
@@ -268,13 +268,13 @@ if (program.migrate || program.undo) {
...
@@ -268,13 +268,13 @@ if (program.migrate || program.undo) {
}
}
var
mirationContent
=
""
var
mirationContent
=
""
,
migrationExtension
=
support
CS
?
'.coffee'
:
'.js'
,
migrationExtension
=
support
sCoffee
?
'.coffee'
:
'.js'
,
migrationName
=
[
,
migrationName
=
[
moment
().
format
(
'YYYYMMDDHHmmss'
),
moment
().
format
(
'YYYYMMDDHHmmss'
),
(
typeof
program
.
createMigration
===
'string'
)
?
program
.
createMigration
:
'unnamed-migration'
(
typeof
program
.
createMigration
===
'string'
)
?
program
.
createMigration
:
'unnamed-migration'
].
join
(
'-'
)
+
migrationExtension
].
join
(
'-'
)
+
migrationExtension
if
(
support
CS
)
{
if
(
support
sCoffee
)
{
migrationContent
=
[
migrationContent
=
[
"module.exports = "
,
"module.exports = "
,
" up: (migration, DataTypes, done) ->"
,
" up: (migration, DataTypes, done) ->"
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment