Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ bazel-genfiles
bazel-out
bazel-testlogs
bazel-rules_node
bazel-app
1 change: 1 addition & 0 deletions bazel-rules_node-master
1,327 changes: 1,327 additions & 0 deletions examples/npm/react/BUILD

Large diffs are not rendered by default.

98 changes: 98 additions & 0 deletions examples/npm/react/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions examples/webpack_build/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package(default_visibility = ['//visibility:public'])

load('@org_dropbox_rules_node//node:defs.bzl', 'webpack_build')
load('@org_dropbox_rules_node//node:defs.bzl', 'mocha_test')

webpack_build(
name = 'webpack_build',
Expand All @@ -14,5 +15,18 @@ webpack_build(
'@org_dropbox_rules_node//node/dbx-bazel-utils',
'//examples/npm/ts-loader',
'//examples/npm/typescript',
'//examples/npm/react',
'//examples/internal_module',
],
)

mocha_test(
name = 'mocha_test',
srcs = glob([
'test/*.spec.js'
]),
deps = [
'@org_dropbox_rules_node//node/dbx-bazel-utils',
'//examples/webpack_build'
],
)
4 changes: 3 additions & 1 deletion examples/webpack_build/src/entry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import {stuff} from 'stuff';
import * as im from 'internal_module';
import * as r from 'react/dist/react';

export function someStuff() {
return '1' + stuff;
return '3' + stuff + im;
}
7 changes: 7 additions & 0 deletions examples/webpack_build/test/index.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const expect = require('chai').expect;

describe('test', () => {
it('should run', () => {
expect(1).to.equal(1);
});
});
2 changes: 1 addition & 1 deletion examples/webpack_build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
module: {
rules: [
{
test: /\.tsx?$/,
test: /\.{t,j}sx?$/,
loader: 'ts-loader',
},
],
Expand Down
3 changes: 3 additions & 0 deletions run-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#/bin/bash

docker run -it -v "$PWD":/usr/src/app insready/bazel /bin/bash