Skip to content

Commit 0024343

Browse files
committed
Move source to src, build output to lib, to match NPM package standards
1 parent 75ca51d commit 0024343

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+36
-3168
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ build
99
node_modules
1010
.idea
1111
docs/build
12+
lib

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lib/
1+
src/

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ Note: This is in active development, the API is not stable. Please try it out an
77
## Include module in Node.js application
88

99
```javascript
10-
var neo4j = require('build/node/neo4j');
10+
var neo4j = require('lib/neo4j');
1111
```
1212

1313
## Include in web browser
1414
A global object `neo4j` will be available.
1515

1616
```html
17-
<script src="build/browser/neo4j-web.min.js"></script>
17+
<script src="lib/browser/neo4j-web.min.js"></script>
1818
```
1919

2020
## Usage examples (for both Node.js and browser environments)
@@ -74,7 +74,7 @@ session.run(statement.join(' '), params)
7474
npm install
7575
npm build
7676

77-
This produces browser-compatible standalone files under `build/browser` and a Node.js module version under `build/node`.
77+
This produces browser-compatible standalone files under `lib/browser` and a Node.js module version under `lib/`.
7878
See files under `examples/` on how to use.
7979

8080
## Testing

esdoc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"source": "./lib",
2+
"source": "./src",
33
"destination": "./docs/build",
44
"includes": ["\\.js$"],
55
"excludes": ["external"],

examples/neo4j.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
padding: 0 2px;
9494
}
9595
</style>
96-
<script src="../build/browser/neo4j-web.min.js"></script>
96+
<script src="../lib/browser/neo4j-web.min.js"></script>
9797
</head>
9898
<body>
9999

@@ -131,7 +131,7 @@ <h1>Cypher Runner for New Remoting</h1>
131131
</div>
132132

133133
<script>
134-
var driver = neo4j.driver("neo4j://localhost");
134+
var driver = neo4j.driver("bolt+ws://localhost");
135135
var session = driver.session();
136136

137137
function run() {

examples/node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* limitations under the License.
1818
*/
1919

20-
var neo4j = require('../build/node/neo4j');
20+
var neo4j = require('neo4j');
2121

2222
var statement = ['MERGE (alice:Person {name:{name_a},age:{age_a}})',
2323
'MERGE (bob:Person {name:{name_b},age:{age_b}})',

gulpfile.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ gulp.task('browser', function(cb){
4848

4949
/** Build all-in-one files for use in the browser */
5050
gulp.task('build-browser', function () {
51-
var browserOutput = 'build/browser';
51+
var browserOutput = 'lib/browser';
5252
// Our app bundler
5353
var appBundler = browserify({
54-
entries: ['lib/neo4j.js'],
54+
entries: ['src/neo4j.js'],
5555
cache: {},
5656
standalone: 'neo4j',
5757
packageCache: {}
@@ -74,7 +74,7 @@ gulp.task('build-browser', function () {
7474
});
7575

7676
gulp.task('build-browser-test', function(){
77-
var browserOutput = 'build/browser';
77+
var browserOutput = 'lib/browser/';
7878
var testFiles = [];
7979
return gulp.src('./test/**/*.test.js')
8080
.pipe( through.obj( function( file, enc, cb ) {
@@ -112,14 +112,14 @@ var compress = function(source, dest, filename) {
112112

113113
var buildNode = function(options) {
114114
return gulp.src(options.src)
115-
.pipe(babel({ignore: ['lib/external/**/*.js']}))
115+
.pipe(babel({ignore: ['src/external/**/*.js']}))
116116
.pipe(gulp.dest(options.dest))
117117
}
118118

119119
gulp.task('nodejs', function(){
120120
return buildNode({
121-
src: 'lib/**/*.js',
122-
dest: 'build/node'
121+
src: 'src/**/*.js',
122+
dest: 'lib'
123123
});
124124
})
125125

@@ -156,13 +156,13 @@ gulp.task('test-browser', function (cb) {
156156
});
157157

158158
gulp.task('run-browser-test', function(){
159-
return gulp.src('build/browser/neo4j-web.test.js')
159+
return gulp.src('lib/browser/neo4j-web.test.js')
160160
.pipe(jasmineBrowser.specRunner({console: true}))
161161
.pipe(jasmineBrowser.headless())
162162
});
163163

164164
gulp.task('watch', function () {
165-
watch('lib/**/*.js', batch(function (events, done) {
165+
watch('src/**/*.js', batch(function (events, done) {
166166
gulp.start('all', done);
167167
}));
168168
});

lib/external/text-encoding/lib/encoding-indexes.js

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)