Commit 64894d0f authored by Nacim Goura's avatar Nacim Goura

add eslint

parent 54f75445
/node_modules/*
/public/bower_components/*
\ No newline at end of file
{
"extends": "eslint:recommended",
"plugins": [
"standard",
"promise"
],
"env": {
"browser": true,
"node": true,
"es6": true
},
"rules": {
"no-unused-vars": "warn",
"indent": ["error", 4, { "SwitchCase": 1 }],
"linebreak-style": ["error", "unix"],
"semi": ["error", "always"],
......
"use strict";
module.exports = {
addApi() {
......
......@@ -8,6 +8,11 @@ const Q = require('q');
module.exports = {
/**
* get all site in sitemap.xml
* @param urlSiteMap
* @returns array sites
*/
getSiteMap(urlSiteMap) {
let sitemap = new Sitemapper();
let deferred = Q.defer();
......@@ -19,6 +24,11 @@ module.exports = {
return deferred.promise;
},
/**
* crawl array sites
* @param listSite
* @param term
*/
crawlUrl(listSite, term) {
let c = new Crawler({
maxConnections : 1000,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment