Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
WestCoastSwing
/
RelativePlacement
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
cf5dcc15
...
cf5dcc15bcf72e4c74b64d0df59ed3d466170e3f
authored
2016-12-05 21:45:56 +0100
by
Vincent Peybernes
1
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
#7
Add build task to transpil
1 parent
4d61bcc8
Pipeline
#10
for
cf5dcc15
failed
in 55 seconds
Changes
7
Pipelines
1
Builds
4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
11 deletions
.gitignore
.gitlab-ci.yml
gulpfile.js
relative-placement.js → lib/relative-placement.js
package.json
tests/node/GlobalSpec.js
tests/node/RelativePlacementSpec.js
.gitignore
View file @
cf5dcc1
.idea
node_modules
\ No newline at end of file
node_modules
dist
\ No newline at end of file
...
...
.gitlab-ci.yml
View file @
cf5dcc1
...
...
@@ -5,10 +5,22 @@ cache:
-
node_modules/
stages
:
-
install
-
test
-
build
install
:
stage
:
install
script
:
-
npm install
node_test
:
stage
:
test
script
:
-
npm install
-
npm test
build
:
stage
:
build
script
:
-
npm run build
...
...
gulpfile.js
0 → 100644
View file @
cf5dcc1
/**
* Created by Techniv on 05/12/2016.
*/
const
srcPath
=
'./lib/relative-placement.js'
;
const
distPath
=
'./dist/'
;
var
gulp
=
require
(
'gulp'
);
var
babel
=
require
(
'gulp-babel'
);
var
del
=
require
(
'del'
);
gulp
.
task
(
'default'
,
[
'build'
]);
gulp
.
task
(
'build'
,[
'clean'
],
()
=>
{
return
gulp
.
src
(
srcPath
)
.
pipe
(
babel
({
presets
:
[
'es2015'
]
}))
.
pipe
(
gulp
.
dest
(
distPath
));
});
gulp
.
task
(
'clean'
,()
=>
{
return
del
(
distPath
);
});
\ No newline at end of file
relative-placement.js
→
lib/
relative-placement.js
View file @
cf5dcc1
/**
* Created by Techniv on 30/11/2016.
* @module relative
_p
lacement
* @module relative
P
lacement
*/
(
function
(
define
)
{
module
.
exports
=
define
();
(
function
(
definition
)
{
// Node export
if
(
global
&&
module
&&
module
.
exports
)
return
module
.
exports
=
definition
();
//Browser export
if
(
window
){
if
(
angular
&&
angular
.
version
.
major
==
1
)
return
angular
.
module
(
'relativePlacement'
).
factory
(
'RelativePlacement'
,
definition
);
if
(
requirejs
)
return
define
(
definition
());
window
.
RelativePlacement
=
definition
();
}
})(
function
(){
/**
...
...
package.json
View file @
cf5dcc1
...
...
@@ -3,12 +3,16 @@
"version"
:
"0.0.1"
,
"devDependencies"
:
{
"gulp"
:
"*"
,
"
nodeunit
"
:
"*"
,
"
mocha
"
:
"*"
,
"
karma
"
:
"*"
,
"
karma-
mocha"
:
"*"
"
gulp-babel
"
:
"*"
,
"
del
"
:
"*"
,
"
babel-preset-es2015
"
:
"*"
,
"mocha"
:
"*"
},
"scripts"
:
{
"build"
:
"./node_modules/.bin/gulp build"
,
"test"
:
"./node_modules/.bin/mocha bdd tests/node/**/*Spec.js"
},
"engines"
:
{
"node"
:
">=6.9.*"
}
}
...
...
tests/node/GlobalSpec.js
View file @
cf5dcc1
...
...
@@ -2,7 +2,7 @@
* Created by Techniv on 30/11/2016.
*/
var
assert
=
require
(
'assert'
);
var
RelativePlacement
=
require
(
'../../relative-placement'
);
var
RelativePlacement
=
require
(
'../../
lib/
relative-placement'
);
describe
(
'RelativePlacement global'
,
()
=>
{
it
(
'should provide RelativePlacement constructor'
,
()
=>
{
...
...
tests/node/RelativePlacementSpec.js
View file @
cf5dcc1
...
...
@@ -3,7 +3,7 @@
*/
var
assert
=
require
(
'assert'
);
/** @type RelativePlacement.relativePlacement */
var
relativePlacement
=
require
(
'../../relative-placement'
).
relativePlacement
;
var
relativePlacement
=
require
(
'../../
lib/
relative-placement'
).
relativePlacement
;
/** @var {TestData[]} */
var
testDataList
=
require
(
'./results_data.json'
);
describe
(
'RelativePlacement algo'
,
()
=>
{
...
...
Vincent Peybernes
@Techniv
Mentioned in issue
#6
2016-12-05 21:46:21 UTC
Mentioned in issue
#6
Toggle commit list
Please
register
or
sign in
to post a comment