Coder Social home page Coder Social logo

shared-karma-files's Introduction

karma-shared-files

karma-shared-files centralizes all the shared files between the Karma projects.

Installation

npm install karma-shared-files --save-dev

Usage

Shared folder

The files in the shared folder are meant to be directly linked inside your project without any modification. For more information, see the karmaSharedFiles option.

Models folder

The files in the models folder are meant to be copied and modified to fit your needs.

Options

sharedKarmaFiles

Type: Object

You have to provide an object which will be used to determined which files have to be linked and where they should be linked.

The keys represent which files you want to link (relatively to the ./shared folder in this very repository), the values represent where you want to link them (relatively to your package.json).

Examples

This example shows how to link the editorconfig from the shared folder to the .editorconfig endpoint at your project root.

sharedKarmaFiles: {
  "editorconfig": ".editorconfig"
}

This example shows how to link the integration-tests.sh file to a specific folder.

sharedKarmaFiles: {
  "test/integration-tests.sh": "test/integration-tests.sh"
}

Notes

Contributors

See package.json.

License

See LICENSE.

shared-karma-files's People

Contributors

aymericbeaumet avatar maksimr avatar vojtajina avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

shared-karma-files's Issues

Package name conflict

We need to change the name key in package.json as it may be a day in conflict with this package.

This will not impact the repository name on GitHub.

@vojtajina didn't want to use karma-common as karma-xxx has to be kept for Karma plugins.

So here some suggestions:

  • common-files-karma
  • common-karma

What do you think guys?

JavaScript space between parenthesis

Hello,

We have an example here of a code which passes the JSCS check with and without space between the parenthesis.

if (true) and if ( true ) are both correct by now.

I suggest we add a new rule to forbid the second case.

Thoughts on it?

Register package on npmjs.org

npm install karma-shared-files --save-dev
npm http GET https://registry.npmjs.org/karma-shared-files
npm http 404 https://registry.npmjs.org/karma-shared-files
npm ERR! 404 404 Not Found: karma-shared-files
npm ERR! 404 
npm ERR! 404 'karma-shared-files' is not in the npm registry.

Reflection

So here are centralized all the configuration files for the karma projects. We need to make some of them (CoffeeLint, JSCS, JSHint, Git attributes) accessible from the project root directory.

I think the most pertinent way is to create symlinks via a postinstall script. The only issue I see is to get the absolute path of the project root from the postinstall script.

Any though on it?

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.