minsky-kit
Version:
Kit of components for MINSKY web agency
45 lines (39 loc) • 1.22 kB
Markdown
This kit is mainly a Front-end js & scss kit we use in our projects. Some back-end snippets and tpls may be included to track all our tools and keep project-specific kits as uncluttered as possible.
```terminal
// npm
npm install minsky-kit
// yarn
yarn add minsky-kit
```
All of our javascript files can be found in `minsky-kit/js` following our usual structure
```javascript
// imports
import MainApp from 'minsky-kit/js/components/MainApp';
// App
export default ProjectApp extends MainApp {
constructor (args = {}) {
super(args);
}
//...
}
```
The project contains some default configuration that can be overridden.
Add a `Config.js` file to the project with the following as base structure.
We use `lodash/merge` to help us easily merge both Config objects.
```javascript
// imports
import merge from 'lodash/merge';
import DEFAULT_CONFIG from 'minsky-kit/js/Config';
export default merge(DEFAULT_CONFIG, {
//... config
});
```
Just like javascript, we can import our common stylesheets from the `minsky-kit/scss` directory
```scss
@import 'minsky-kit/scss/components/Accordion';
```