Skip to content

Commit

Permalink
Merge pull request #43 from Poll-me/release/0.1.0-alpha.1
Browse files Browse the repository at this point in the history
Release 0.1.0-alpha.1
Added
- Basic HomePage that shows basic PollMe info
- Polls module for view the user polls and user activity across any poll
- Poll module for the stuff related to a specific poll (create, fill, etc)
- User module that manages all the user related features like login,
- register or profile update
- Registration poll type
- Share poll utilities for share the poll results on Whats App
- Support pages like NotFoundPage or ErrorPage
- Rapid UI development using Tailwind, the utility-first CSS framework
- Auth support using Firebase authentication
- Firebase real-time database support for store the app data
- Files upload support using the Firebase storage service
- Vuex state management for share the store data across the app
- Form validations using Vuelidate library
- Internationalization support using the vue-i18n library
- Continuous integration (CI) using Travis CI service
- Continuous deployment (CD) using the Netlify service
- PWA app configuration for allow the users install the app on their devices
  • Loading branch information
mdo2 authored May 29, 2018
2 parents 3ec6b76 + d62ef8d commit ea46105
Show file tree
Hide file tree
Showing 136 changed files with 5,946 additions and 648 deletions.
28 changes: 21 additions & 7 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
[
"env",
{
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 10"]
}
}
}],
],
"stage-2"
],
"plugins": ["transform-vue-jsx", "transform-runtime"],
"plugins": [
"transform-vue-jsx",
"transform-runtime",
"transform-decorators-legacy",
"transform-class-properties"
],
"env": {
"test": {
"presets": ["env", "stage-2"],
"plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"]
"plugins": [
"transform-vue-jsx",
"transform-es2015-modules-commonjs",
"dynamic-import-node",
"transform-decorators-legacy",
"transform-class-properties"
]
}
}
}
54 changes: 33 additions & 21 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ module.exports = {
parser: 'babel-eslint'
},
env: {
browser: true,
browser: true
},
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
extends: ['plugin:vue/essential', 'airbnb-base'],
// required to lint *.vue files
plugins: [
'vue'
],
plugins: ['vue'],
// check if imports actually resolve
settings: {
'import/resolver': {
Expand All @@ -26,25 +24,39 @@ module.exports = {
// add your custom rules here
rules: {
// don't require .vue extension when importing
'import/extensions': ['error', 'always', {
js: 'never',
vue: 'never'
}],
'import/extensions': [
'error',
'always',
{
js: 'never',
vue: 'never'
}
],
// disallow reassignment of function parameters
// disallow parameter object manipulation except for specific exclusions
'no-param-reassign': ['error', {
props: true,
ignorePropertyModificationsFor: [
'state', // for vuex state
'acc', // for reduce accumulators
'e' // for e.returnvalue
]
}],
'no-param-reassign': [
'error',
{
props: true,
ignorePropertyModificationsFor: [
'state', // for vuex state
'acc', // for reduce accumulators
'e' // for e.returnvalue
]
}
],
// allow optionalDependencies
'import/no-extraneous-dependencies': ['error', {
optionalDependencies: ['test/unit/index.js']
}],
'import/no-extraneous-dependencies': [
'error',
{
optionalDependencies: ['test/unit/index.js']
}
],
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// no trailing commas allowed
'comma-dangle': ['error', 'never'],
'no-console': ['error'],
"class-methods-use-this": ['error', { "exceptMethods": ['beforeRouteEnter'] }]
}
}
};
8 changes: 8 additions & 0 deletions .postcssrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# YAML format
# https://github.com/michael-ciniawsky/postcss-load-config

plugins:
postcss-import: {}
postcss-url: {}
tailwindcss: './tailwind-config.js'
postcss-cssnext: {}
10 changes: 0 additions & 10 deletions .postcssrc.js

This file was deleted.

11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: node_js
node_js:
- "8"
jobs:
include:
- stage: lint
script: yarn lint
- stage: test
script: yarn unit
- stage: build
script: yarn build
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,32 @@
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [0.1.0] - 2018-05-28

### Added

- Basic `HomePage` that shows basic PollMe info
- **Polls module** for view the user polls and user activity across any poll
- **Poll module** for the stuff related to a specific poll (create, fill, etc)
- **User module** that manages all the user related features like login,
register or profile update
- **Registration** poll type
- **Share poll** utilities for share the poll results on **Whats App**
- Support pages like **NotFoundPage** or **ErrorPage**
- Rapid **UI development** using **Tailwind**, the utility-first CSS framework
- **Auth** support using **Firebase authentication**
- **Firebase real-time database** support for **store the app data**
- **Files upload** support using the **Firebase storage** service
- **Vuex** state management for **share the store data** across the app
- Form **validations** using **Vuelidate** library
- **Internationalization** support using the **vue-i18n** library
- **Continuous integration** (CI) using **Ttravis CI** service
- **Continuous deployment** (CD) using the **Netlify** service
- **PWA** app configuration for allow the users install the app on their devices

[Unreleased]: https://github.com/Poll-me/poll-me-vue/compare/v0.1.0-alpha.1...HEAD
[0.1.0]: https://github.com/Poll-me/poll-me-vue/compare/v0.0.0...v0.1.0-alpha.1
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
<img width="192" alt="PollMe WebApp" src="static/img/favicon/android-chrome-192x192.png">
</a>
<a href="https://vuejs.org" target="_blank">
<img width="192" alt="Vue JS" src="src/assets/logo.png">
<img width="192" alt="Vue JS" src="static/img/vue-logo.png">
</a>
</p>
<!-- markdownlint-enable MD033 -->

# PollMe Vue

![GitHub (pre-)release](https://img.shields.io/github/release/Poll-me/poll-me-vue/all.svg)
[![Build Status](https://travis-ci.com/Poll-me/poll-me-vue.svg?branch=develop)](https://travis-ci.com/Poll-me/poll-me-vue)
[![Deploys by Netlify](https://www.netlify.com/img/global/badges/netlify-color-accent.svg)](https://www.netlify.com)

> The VueJS version of the PollMe webapp
This is the awesome app with with you be able to collect in the most easy way
Expand Down Expand Up @@ -89,4 +93,4 @@ of the source code, for example, at webpack configuration.
- **Production** (`prod`): the environment for serve the production app files.
For example at deploy environments.

[vue-cli]: https://github.com/vuejs/vue-cli
[vue-cli]: https://github.com/vuejs/vue-cli
2 changes: 1 addition & 1 deletion build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const webpackConfig = require('./webpack.prod.conf')
const spinner = ora('building for production...')
spinner.start()

rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
rm(path.join(config.build.assetsRoot), err => {
if (err) throw err
webpack(webpackConfig, (err, stats) => {
spinner.stop()
Expand Down
11 changes: 11 additions & 0 deletions build/load-minified.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use strict'

const fs = require('fs')
const UglifyJS = require('uglify-es')

module.exports = function(filePath) {
const code = fs.readFileSync(filePath, 'utf-8')
const result = UglifyJS.minify(code)
if (result.error) return ''
return result.code
}
17 changes: 17 additions & 0 deletions build/service-worker-dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// This service worker file is effectively a 'no-op' that will reset any
// previous service worker registered for the same host:port combination.
// In the production build, this file is replaced with an actual service worker
// file that will precache your site's local assets.
// See https://github.com/facebookincubator/create-react-app/issues/2272#issuecomment-302832432

self.addEventListener('install', () => self.skipWaiting());

self.addEventListener('activate', () => {
self.clients.matchAll({ type: 'window' }).then(windowClients => {
for (let windowClient of windowClients) {
// Force open pages to refresh, so that they have a chance to load the
// fresh navigation response from the local dev server.
windowClient.navigate(windowClient.url);
}
});
});
55 changes: 55 additions & 0 deletions build/service-worker-prod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
(function() {
'use strict';

// Check to make sure service workers are supported in the current browser,
// and that the current page is accessed from a secure origin. Using a
// service worker from an insecure origin will trigger JS console errors.
var isLocalhost = Boolean(window.location.hostname === 'localhost' ||
// [::1] is the IPv6 localhost address.
window.location.hostname === '[::1]' ||
// 127.0.0.1/8 is considered localhost for IPv4.
window.location.hostname.match(
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
)
);

window.addEventListener('load', function() {
if ('serviceWorker' in navigator &&
(window.location.protocol === 'https:' || isLocalhost)) {
navigator.serviceWorker.register('service-worker.js')
.then(function(registration) {
// updatefound is fired if service-worker.js changes.
registration.onupdatefound = function() {
// updatefound is also fired the very first time the SW is installed,
// and there's no need to prompt for a reload at that point.
// So check here to see if the page is already controlled,
// i.e. whether there's an existing service worker.
if (navigator.serviceWorker.controller) {
// The updatefound event implies that registration.installing is set
var installingWorker = registration.installing;

installingWorker.onstatechange = function() {
switch (installingWorker.state) {
case 'installed':
// At this point, the old content will have been purged and the
// fresh content will have been added to the cache.
// It's the perfect time to display a "New content is
// available; please refresh." message in the page's interface.
break;

case 'redundant':
throw new Error('The installing ' +
'service worker became redundant.');

default:
// Ignore
}
};
}
};
}).catch(function(e) {
console.error('Error during service worker registration:', e);
});
}
});
})();
5 changes: 4 additions & 1 deletion build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ const createLintingRule = () => ({
include: [resolve('src'), resolve('test')],
options: {
formatter: require('eslint-friendly-formatter'),
emitWarning: !config.dev.showEslintErrorsInOverlay
emitWarning: !config.dev.showEslintErrorsInOverlay,
rules: {
'no-console': ['warn']
}
}
})

Expand Down
11 changes: 9 additions & 2 deletions build/webpack.dev.conf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use strict'
const fs = require('fs')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
Expand Down Expand Up @@ -55,14 +56,20 @@ const devWebpackConfig = merge(baseWebpackConfig, {
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true
inject: true,
serviceWorkerLoader: `<script>${fs.readFileSync(path.join(__dirname,
'./service-worker-dev.js'), 'utf-8')}</script>`
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static/root'),
to: './'
},
{
from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory,
ignore: ['.*']
ignore: ['.*', 'root/*']
}
])
]
Expand Down
Loading

0 comments on commit ea46105

Please sign in to comment.