Giter VIP home page Giter VIP logo

sourcejs-react-dependencies's Introduction

SourceJS Auto React Dependencies Builder Middleware

Uses : babylon: "~5.8.3", recast: "^0.10.41" & node-source-walk: "^2.1.0" to renders React components dependencies into SourceJS Spec page.

Compatible with SourceJS 0.6.0+.

Install

npm install sourcejs-react-dependencies --save

After restarting your app, middleware will be loaded automatically. To disable it, remove npm module and restart the app.

Usage

After installing the middleware, during SourceJS Spec load plugin will try to find first <specPath>/*.jsx file, analyze it and expose raw and rendered into HTML data objects. Data will be then available within EJS Spec pre-rendering.

Insert these code snippets anywhere you want in your Spec file:

<h1>My Spec</h1>

<section class="source_section">
    <h2>Default Example</h2>

    <p><%- info.__dependenciesRAW.description[0].name %></p>

    <%- info.__dependenciesHTML %>

    <div class="source_example"></div>
</section>
# My Spec

## Default Example

<%- info.__dependenciesRAW.description[0].name %>

<%- info.__dependenciesHTML %>

```example
code
```

Check usage examples in sourcejs-react-bundle-example

EJS exposed data

  • info.__dependenciesRAW - raw JSON array with objects
  • info.__dependenciesGROUPED - raw JSON object with arrays
  • info.__dependenciesHTML - rendered list

Configuration

Or overriding global plugin configuration:

module.exports = {
	plugins: {
		dependencies: {
			componentPath: 'custom/path/index.jsx',
		}
	}
};

See other configuration options below.

enabled

Default: true Type: boolean

Set false to disable middleware.

componentPath

Default: '*.jsx' Type: string

Define custom path to component entry file. Accepts glob string, which will be resolved relatively to spec path (takes only first found file).

TODO:

  • Better styling
  • Detecting if a dependency is a spec and thus has a page to link to
  • Link to npm package

Pull request highly welcome!

sourcejs-react-dependencies's People

Contributors

greenkeeper[bot] avatar ndelangen avatar

Stargazers

 avatar

Watchers

 avatar

sourcejs-react-dependencies's Issues

An in-range update of detective-es6 is breaking the build 🚨

Version 1.2.0 of detective-es6 just got published.

Branch Build failing 🚨
Dependency detective-es6
Current Version 1.1.6
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

detective-es6 is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • βœ… dependency-ci Dependencies checked Details
  • ❌ continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 2 commits.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of ejs is breaking the build 🚨

Version 2.5.7 of ejs just got published.

Branch Build failing 🚨
Dependency ejs
Current Version 2.5.6
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

ejs is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • βœ… dependency-ci Dependencies checked Details
  • ❌ continuous-integration/appveyor/branch AppVeyor build failed Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of mocha is breaking the build 🚨

Version 3.3.0 of mocha just got published.

Branch Build failing 🚨
Dependency mocha
Current Version 3.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As mocha is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details - βœ… **dependency-ci** Dependencies checked [Details](https://dependencyci.com/builds/198552),- ❌ **continuous-integration/appveyor/branch** AppVeyor build failed [Details](https://ci.appveyor.com/project/ndelangen/sourcejs-react-dependencies/build/1.0.27)

Release Notes coverave

Thanks to all our contributors, maintainers, sponsors, and users! ❀️

As highlights:

  • We've got coverage now!
  • Testing is looking less flaky \o/.
  • No more nitpicking about "mocha.js" build on PRs.

πŸŽ‰ Enhancements

  • #2659: Adds support for loading reporter from an absolute or relative path (@sul4bh)
  • #2769: Support --inspect-brk on command-line (@igwejk)

πŸ› Fixes

  • #2662: Replace unicode chars w/ hex codes in HTML reporter (@rotemdan)

πŸ” Coverage

πŸ”© Other

Commits

The new version differs by 89 commits0.

  • fb1687e :ship: Release v3.3.0
  • 1943e02 Add Changelog for v3.3.0
  • 861e968 Refactor literal play-icon hex code to a var
  • 1d3c5bc Fix typo in karma.conf.js
  • 9bd9389 Fix spec paths in test HTML files
  • 0a93024 Adds tests for loading reporters w/ relative/absolute paths (#2773)
  • 73929ad Comment special treatment of '+' in URL query parsing
  • e2c9514 Merge pull request #2769 from igwejk/support_inspect_break_in_opts
  • 038c636 Support --inspect-brk on command-line
  • b4ebabd Merge pull request #2727 from lamby/reproducible-build
  • 882347b Please make the build reproducible.
  • a2fc76c Merge pull request #2703 from seppevs/cover_utils_some_fn_with_tests
  • ed61cd0 cover .some() function in utils.js with tests
  • f42cbf4 Merge pull request #2701 from craigtaub/landingSpec
  • 6065242 use stubbed symbol

There are 89 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of bluebird is breaking the build 🚨

Version 3.5.0 of bluebird just got published.

Branch Build failing 🚨
Dependency bluebird
Current Version 3.4.7
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As bluebird is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • βœ… dependency-ci Dependencies checked Details

  • ❌ continuous-integration/appveyor/branch AppVeyor build failed Details

Release Notes v3.5.0

Features:

Bugfixes:

  • Fixed streamline benchmarks (#1233)
  • Fixed yielding a function calling the function (#1314, #1315)
  • Fixed confusing error message when calling .catch with non function predicate (#1350)
  • Fixed .props resolving to empty object when called with empty Map (#1338)
  • Fixed confusing error message when invoking Promise directly without new (#1320)
  • Added dedicated webpack entry point (#1318)
Commits

The new version differs by 23 commits .

  • 0b281e6 Release v3.5.0
  • 053d02e add tapCatch (#1220)
  • 8d52820 Added dedicated webpack entry point. (#1318)
  • 6bdc243 fixes #1320
  • c5b3ef3 fixes #1338
  • 1d9cba4 Fix typo which mentioned that tap was called for rejections. (#1343)
  • 901a563 Reword the catch predicate TypeError message for clarity (#1350)
  • b6a1b33 update benchmarks
  • 08ae83f Update LICENSE (#1349)
  • 4a4429e Update README.md
  • 0566325 Fixed #1314: yielding a function should not call the function (#1315)
  • f1409ba fix typo (#1325)
  • a9af75f Update promise.each.md (#1317)
  • d9a3a62 add isCancelled() regression tests (#1239)
  • d020e49 Update disposer.md (#1255)

There are 23 commits in total. See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.