Skip to content

Commit

Permalink
Merge pull request #49 from alexander-schranz/feature/restructure-sul…
Browse files Browse the repository at this point in the history
…u-web-js

Restructure repository for better splitting
  • Loading branch information
chirimoya committed Apr 12, 2019
2 parents d038283 + 0609a8c commit 76433b2
Show file tree
Hide file tree
Showing 21 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ Thumbs.db
node_modules
yarn-error.log
yarn.lock
package-json.lock
package-lock.json

!**/.gitkeep
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Changes

## 2.0.0


- ENHANCEMENT: Add possibility to extend container link attributes. #48
- BUGFIX: Fix menu button for chrome. #47
- FEATURE: Add animation link hover scss mixin. #46
- FEATURE: Add window scroll js component. #45
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 MASSIVE ART WebServices GmbH
Copyright (c) 2019 Sulu GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
[![CircleCi](https://circleci.com/gh/massiveart/web-js.png?style=shield)](https://circleci.com/gh/massiveart/web-js)
[![npm](https://img.shields.io/npm/v/massive-web.svg)](https://www.npmjs.com/package/massive-web)
[![Size](https://img.shields.io/github/size/massiveart/web-js/js/core.js.svg)](https://github.com/massiveart/web-js/blob/master/js/core.js)
[![Install Size](https://packagephobia.now.sh/badge?p=massive-web)](https://packagephobia.now.sh/result?p=massive-web)
[![CircleCi](https://circleci.com/gh/sulu/web-js.png?style=shield)](https://circleci.com/gh/sulu/web-js)
[![npm](https://img.shields.io/npm/v/@sulu/web.svg)](https://www.npmjs.com/package/@sulu/web)
[![Size](https://img.shields.io/github/size/sulu/web-js/js/core.js.svg)](https://github.com/sulu/web-js/blob/master/js/core.js)
[![Install Size](https://packagephobia.now.sh/badge?p=@sulu/web)](https://packagephobia.now.sh/result?p=@sulu/web)

# Web JS

The web-js in connection with [web component twig extension](https://github.com/massiveart/web-twig)
The web-js in connection with [web component twig extension](https://github.com/sulu/web-twig)
gives you simple and efficient way to handle your javascript components over twig.

## Installation

**Yarn**
**NPM**

```bash
yarn add massive-web
npm install @sulu/web
```

**NPM**
**Yarn**

```bash
npm install massive-web
yarn add @sulu/web
```

## Usage
Expand Down Expand Up @@ -85,10 +85,6 @@ module.exports = test;
import $ from 'jquery';

export default class Test {
constructor() {
this.text = '';
}

initialize(el, options) {
this.text = options.text;
$(el).click(this.say);
Expand Down Expand Up @@ -119,7 +115,7 @@ module.exports = {

```js
// js/main.js
var web = window.web = require('massive.web');
var web = window.web = require('@sulu/web');

// services
web.registerService('logger', require('./services/log.js'));
Expand All @@ -133,7 +129,7 @@ web.registerComponent('more', require('./components/test-class'), { defaultOptio
When using ES6:

```
import web from 'massive-web';
import web from '@sulu/web';
import Test from './components/test'
import Other from './components/more'
import Log from './services/log';
Expand All @@ -153,7 +149,7 @@ For efficient handling its recommended to use it with a template engine like twi

#### Twig

For twig embedding see the [web component twig extension](https://github.com/massiveart/web-twig).
For twig embedding see the [web component twig extension](https://github.com/sulu/web-twig).

#### HTML

Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "massive-web",
"name": "@sulu/web",
"version": "2.0.0-rc1",
"description": "Manage your js components",
"main": "js/core.js",
"main": "packages/core/core.js",
"repository": {
"type": "git",
"url": "https://github.com/massiveart/web-js.git"
"url": "https://github.com/sulu/web-js.git"
},
"scripts": {
"lint": "npm run lint:js && npm run lint:css",
"lint:fix": "npm run lint:js:fix && npm run lint:css:fix",
"lint:js": "eslint src",
"lint:js:fix": "eslint src --fix",
"lint:css": "stylelint scss/**/*.scss",
"lint:css:fix": "stylelint scss/**/*.scss --fix"
"lint:js": "eslint packages",
"lint:js:fix": "eslint packages --fix",
"lint:css": "stylelint packages/scss/**/*.scss",
"lint:css:fix": "stylelint packages/scss/**/*.scss --fix"
},
"keywords": [
"js",
Expand All @@ -22,7 +22,7 @@
],
"license": "MIT",
"bugs": {
"url": "https://github.com/massiveart/web-js/issues"
"url": "https://github.com/sulu/web-js/issues"
},
"peerDependencies": {
"jquery": ">=1.7.2"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Container link component

'use strict';

var $ = require('jquery');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Expand trigger component module

'use strict';

var $ = require('jquery');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = function Truncate() {
* Lorem ipsum ...
* </div>
*
* import truncate from 'massive-web/src/components/truncate';
* import truncate from '@sulu/web/packages/components/truncate';
* truncate.initialize($('#truncate'), {});
*
* @param {HTMLElement} el
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Window scroll component

'use strict';

module.exports = function WindowScroll() {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions js/lazy.js → packages/experimental/lazy/lazy.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Lazy loader based on webpacke bundle loader: https://github.com/webpack-contrib/bundle-loader
// Lazy loader based on webpack bundle loader: https://github.com/webpack-contrib/bundle-loader

'use strict';

var $ = require('jquery');
var web = require('./core');
var web = require('./../../core/core');

/**
* @experimental
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 76433b2

Please sign in to comment.