8000 js-cookie/Gruntfile.js at master · kyroskoh/js-cookie · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
{"payload":{"allShortcutsEnabled":false,"fileTree":{"":{"items":[{"name":"src","path":"src","contentType":"directory"},{"name":"test","path":"test","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".jshintignore","path":".jshintignore","contentType":"file"},{"name":".jshintrc","path":".jshintrc","contentType":"file"},{"name":".tm_properties","path":".tm_properties","contentType":"file"},{"name":".travis.yml","path":".travis.yml","contentType":"file"},{"name":"CONTRIBUTING.md","path":"CONTRIBUTING.md","contentType":"file"},{"name":"Gruntfile.js","path":"Gruntfile.js","contentType":"file"},{"name":"MIT-LICENSE.txt","path":"MIT-LICENSE.txt","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"bower.json","path":"bower.json","contentType":"file"},{"name":"package.json","path":"package.json","contentType":"file"},{"name":"travis.sh","path":"travis.sh","contentType":"file"}],"totalCount":14}},"fileTreeProcessingTime":7.539053,"foldersToFetch":[],"incompleteFileTree":false,"repo":{"id":43674030,"defaultBranch":"master","name":"js-cookie","ownerLogin":"kyroskoh","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2015-10-05T08:54:35.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/553181?v=4","public":true,"private":false,"isOrgOwned":false},"codeLineWrapEnabled":false,"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"master","listCacheKey":"v0:1615371340.0106099","canEdit":false,"refType":"branch","currentOid":"c2c73cd0ea49256a53f613e7fa638f73b8bd9979"},"path":"Gruntfile.js","currentUser":null,"blob":{"rawLines":["/*jshint node:true */","'use strict';","","module.exports = function (grunt) {","","\tfunction encodingMiddleware(request, response, next) {","\t\tvar url = require('url').parse(request.url, true, true);","\t\tvar query = url.query;","\t\tvar pathname = url.pathname;","","\t\tif (pathname !== '/encoding') {","\t\t\tnext();","\t\t\treturn;","\t\t}","","\t\tvar cookieName = query.name;","\t\tvar cookieValue = query.value;","","\t\tresponse.setHeader('content-type', 'application/json');","\t\tresponse.end(JSON.stringify({","\t\t\tname: cookieName,","\t\t\tvalue: cookieValue","\t\t}));","\t}","","\tgrunt.initConfig({","\t\tpkg: grunt.file.readJSON('package.json'),","\t\tqunit: {","\t\t\tall: {","\t\t\t\toptions: {","\t\t\t\t\turls: [","\t\t\t\t\t\t'http://127.0.0.1:9998/',","\t\t\t\t\t\t'http://127.0.0.1:9998/amd.html',","\t\t\t\t\t\t'http://127.0.0.1:9998/encoding.html?integration_baseurl=http://127.0.0.1:9998/'","\t\t\t\t\t]","\t\t\t\t}","\t\t\t},","\t\t},","\t\tnodeunit: {","\t\t\tall: 'test/commonjs.js'","\t\t},","\t\tjshint: {","\t\t\toptions: {","\t\t\t\tjshintrc: true","\t\t\t},","\t\t\tgrunt: 'Gruntfile.js',","\t\t\tsource: 'src/**/*.js',","\t\t\ttests: ['test/**/*.js', '!test/polyfill.js']","\t\t},","\t\tjscs: {","\t\t\toptions: {","\t\t\t\trequireCommaBeforeLineBreak: true,","\t\t\t\trequireLineFeedAtFileEnd: true,","\t\t\t\trequireSemicolons: true,","\t\t\t\trequireSpaceBeforeKeywords: ['else', 'while', 'catch'],","\t\t\t\trequireSpaceAfterKeywords: true,","\t\t\t\trequireSpaceAfterLineComment: true,","\t\t\t\trequireSpaceBeforeBlockStatements: true,","\t\t\t\trequireSpaceBeforeObjectValues: true,","\t\t\t\tvalidateIndentation: '\\t',","\t\t\t\tvalidateLineBreaks: 'LF',","\t\t\t\tvalidateQuoteMarks: true,","\t\t\t\tdisallowSpacesInsideArrayBrackets: 'all',","\t\t\t\tdisallowSpacesInsideParentheses: true,","\t\t\t\tdisallowTrailingWhitespace: true","\t\t\t},","\t\t\tgrunt: 'Gruntfile.js',","\t\t\tsource: 'src/**/*.js',","\t\t\ttests: ['test/**/*.js', '!test/polyfill.js']","\t\t},","\t\tuglify: {","\t\t\toptions: {","\t\t\t\tbanner: '/*! \u003c%= pkg.name %\u003e v\u003c%= pkg.version %\u003e | \u003c%= pkg.license %\u003e */\\n'","\t\t\t},","\t\t\tbuild: {","\t\t\t\tfiles: {","\t\t\t\t\t'build/js.cookie-\u003c%= pkg.version %\u003e.min.js': 'src/js.cookie.js'","\t\t\t\t}","\t\t\t}","\t\t},","\t\twatch: {","\t\t\toptions: {","\t\t\t\tlivereload: true","\t\t\t},","\t\t\tfiles: '{src,test}/**/*.js',","\t\t\ttasks: 'default'","\t\t},","\t\tcompare_size: {","\t\t\tfiles: [","\t\t\t\t'build/js.cookie-\u003c%= pkg.version %\u003e.min.js',","\t\t\t\t'src/js.cookie.js'","\t\t\t],","\t\t\toptions: {","\t\t\t\tcompress: {","\t\t\t\t\tgz: function (fileContents) {","\t\t\t\t\t\treturn require('gzip-js').zip(fileContents, {}).length;","\t\t\t\t\t}","\t\t\t\t}","\t\t\t}","\t\t},","\t\tconnect: {","\t\t\t'build-qunit': {","\t\t\t\toptions: {","\t\t\t\t\tport: 9998,","\t\t\t\t\tbase: ['.', 'test'],","\t\t\t\t\tmiddleware: function (connect, options, middlewares) {","\t\t\t\t\t\tmiddlewares.unshift(encodingMiddleware);","\t\t\t\t\t\treturn middlewares;","\t\t\t\t\t}","\t\t\t\t}","\t\t\t},","\t\t\t'build-sauce': {","\t\t\t\toptions: {","\t\t\t\t\tport: 9999,","\t\t\t\t\tbase: ['.', 'test']","\t\t\t\t}","\t\t\t},","\t\t\ttests: {","\t\t\t\toptions: {","\t\t\t\t\tport: 10000,","\t\t\t\t\tbase: ['.', 'test'],","\t\t\t\t\topen: 'http://127.0.0.1:10000',","\t\t\t\t\tkeepalive: true,","\t\t\t\t\tlivereload: true,","\t\t\t\t\tmiddleware: function (connect, options, middlewares) {","\t\t\t\t\t\tmiddlewares.unshift(encodingMiddleware);","\t\t\t\t\t\treturn middlewares;","\t\t\t\t\t}","\t\t\t\t}","\t\t\t}","\t\t},","\t\t'saucelabs-qunit': {","\t\t\tall: {","\t\t\t\toptions: {","\t\t\t\t\turls: ['http://127.0.0.1:9999'],","\t\t\t\t\ttestname: 'Sauce Test for js-cookie',","\t\t\t\t\tbuild: process.env.TRAVIS_JOB_ID,","\t\t\t\t\tpollInterval: 10000,","\t\t\t\t\tstatusCheckAttempts: 90,","\t\t\t\t\tthrottled: 3,","\t\t\t\t\tbrowsers: (function () {","\t\t\t\t\t\tvar browsers = {","\t\t\t\t\t\t\t'iOS': [{","\t\t\t\t\t\t\t\tbrowserName: 'iphone',","\t\t\t\t\t\t\t\tplatform: 'OS X 10.10',","\t\t\t\t\t\t\t\tversion: '8.2',","\t\t\t\t\t\t\t\tdeviceName: 'iPhone Simulator'","\t\t\t\t\t\t\t}, {","\t\t\t\t\t\t\t\tbrowserName: 'iphone',","\t\t\t\t\t\t\t\tplatform: 'OS X 10.10',","\t\t\t\t\t\t\t\tversion: '8.2',","\t\t\t\t\t\t\t\tdeviceName: 'iPad Simulator'","\t\t\t\t\t\t\t}],","\t\t\t\t\t\t\t'android': [{","\t\t\t\t\t\t\t\tbrowserName: 'android',","\t\t\t\t\t\t\t\tplatform: 'Linux',","\t\t\t\t\t\t\t\tversion: '5.1',","\t\t\t\t\t\t\t\tdeviceName: 'Android Emulator'","\t\t\t\t\t\t\t}],","\t\t\t\t\t\t\t'mac': [{","\t\t\t\t\t\t\t\tbrowserName: 'safari',","\t\t\t\t\t\t\t\tplatform: 'OS X 10.10',","\t\t\t\t\t\t\t\tversion: '8.0'","\t\t\t\t\t\t\t}, {","\t\t\t\t\t\t\t\tbrowserName: 'firefox',","\t\t\t\t\t\t\t\tplatform: 'OS X 10.10',","\t\t\t\t\t\t\t\tversion: '36.0'","\t\t\t\t\t\t\t}, {","\t\t\t\t\t\t\t\tbrowserName: 'chrome',","\t\t\t\t\t\t\t\tplatform: 'OS X 10.10',","\t\t\t\t\t\t\t\tversiono: '41.0'","\t\t\t\t\t\t\t}],","\t\t\t\t\t\t\t'windows7': [{","\t\t\t\t\t\t\t\tbrowserName: 'internet explorer',","\t\t\t\t\t\t\t\tplatform: 'Windows 7',","\t\t\t\t\t\t\t\tversion: '11.0'","\t\t\t\t\t\t\t}, {","\t\t\t\t\t\t\t\tbrowserName: 'internet explorer',","\t\t\t\t\t\t\t\tplatform: 'Windows 7',","\t\t\t\t\t\t\t\tversion: '10.0'","\t\t\t\t\t\t\t}, {","\t\t\t\t\t\t\t\tbrowserName: 'internet explorer',","\t\t\t\t\t\t\t\tplatform: 'Windows 7',","\t\t\t\t\t\t\t\tversion: '9.0'","\t\t\t\t\t\t\t}, {","\t\t\t\t\t\t\t\tbrowserName: 'opera',","\t\t\t\t\t\t\t\tplatform: 'Windows 7',","\t\t\t\t\t\t\t\tversion: '12.12'","\t\t\t\t\t\t\t}],","\t\t\t\t\t\t\t'windowsXP': [{","\t\t\t\t\t\t\t\tbrowserName: 'internet explorer',","\t\t\t\t\t\t\t\tplatform: 'Windows XP',","\t\t\t\t\t\t\t\tversion: '8.0'","\t\t\t\t\t\t\t}, {","\t\t\t\t\t\t\t\tbrowserName: 'internet explorer',","\t\t\t\t\t\t\t\tplatform: 'Windows XP',","\t\t\t\t\t\t\t\tversion: '7.0'","\t\t\t\t\t\t\t}, {","\t\t\t\t\t\t\t\tbrowserName: 'internet explorer',","\t\t\t\t\t\t\t\tplatform: 'Windows XP',","\t\t\t\t\t\t\t\tversion: '6.0'","\t\t\t\t\t\t\t}],","\t\t\t\t\t\t\t'linux': [{","\t\t\t\t\t\t\t\tbrowserName: 'opera',","\t\t\t\t\t\t\t\tplatform: 'Linux',","\t\t\t\t\t\t\t\tversion: '12.15'","\t\t\t\t\t\t\t}, {","\t\t\t\t\t\t\t\tbrowserName: 'firefox',","\t\t\t\t\t\t\t\tplatform: 'Linux',","\t\t\t\t\t\t\t\tversion: '37.0'","\t\t\t\t\t\t\t}, {","\t\t\t\t\t\t\t\tbrowserName: 'chrome',","\t\t\t\t\t\t\t\tplatform: 'Linux',","\t\t\t\t\t\t\t\tversion: '41.0'","\t\t\t\t\t\t\t}]","\t\t\t\t\t\t};","","\t\t\t\t\t\tvar matrix = [];","\t\t\t\t\t\tfor (var os in browsers) {","\t\t\t\t\t\t\tmatrix = matrix.concat(browsers[os]);","\t\t\t\t\t\t}","\t\t\t\t\t\treturn matrix;","\t\t\t\t\t}())","\t\t\t\t}","\t\t\t}","\t\t}","\t});","","\t// Loading dependencies","\tfor (var key in grunt.file.readJSON('package.json').devDependencies) {","\t\tif (key !== 'grunt' \u0026\u0026 key.indexOf('grunt') === 0) {","\t\t\tgrunt.loadNpmTasks(key);","\t\t}","\t}","","\tgrunt.registerTask('saucelabs', ['connect:build-sauce', 'saucelabs-qunit']);","\tgrunt.registerTask('test', ['jshint', 'jscs', 'connect:build-qunit', 'qunit', 'nodeunit']);","","\tgrunt.registerTask('dev', ['test', 'uglify', 'compare_size']);","\tgrunt.registerTask('ci', ['test', 'saucelabs']);","","\tgrunt.registerTask('default', 'dev');","};"],"stylingDirectives":null,"colorizedLines":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/kyroskoh/js-cookie/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"Gruntfile.js","displayUrl":"https://github.com/kyroskoh/js-cookie/blob/master/Gruntfile.js?raw=true","headerInfo":{"blobSize":"5.63 KB","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":"https://desktop.github.com","isGitLfs":false,"onBranch":true,"shortPath":"bb2b91a","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fkyroskoh%2Fjs-cookie%2Fblob%2Fmaster%2FGruntfile.js","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"243","truncatedSloc":"232"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"JavaScript","languageID":183,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/kyroskoh/js-cookie/blob/master/Gruntfile.js","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/kyroskoh/js-cookie/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/kyroskoh/js-cookie/raw/refs/heads/master/Gruntfile.js","renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":null},"copilotInfo":null,"copilotAccessAllowed":false,"modelsAccessAllowed":false,"modelsRepoIntegrationEnabled":false,"csrf_tokens":{"/kyroskoh/js-cookie/branches":{"post":"e2_qrYN-kMZhX1J4BObKT3XgXgB2rn7KMMNKY3tHqDoaHFztypyr_RIcO0xi38q_dnl2jnXIa1sM_jbYu9UJ1g"},"/repos/preferences":{"post":"hvwY5_dsZoCA1J6Mv6GViGgPR4eA8NbwUl8sUCRzJdTWQ-ySskCXAThqDMI3sifiaTmuHXYJqMqIqJKmkXxu7w"}}},"title":"js-cookie/Gruntfile.js at master · kyroskoh/js-cookie","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-263cab1760dd.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1b17b3e7786a.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true}}}
0